Small accessibility issue with wxTextEntryDialog

49 views
Skip to first unread message

Quentin Cosendey

unread,
Aug 23, 2026, 12:55:11 AMAug 23
to wx-u...@googlegroups.com
Hello,

I have a small accessibility issue concerning wxTextEntryDialog, and a
few users have noticed and asked about it, so I'm forwarding it here.
I'm using wxWidgets 3.3 under Windows 10 and 11.

wxTextEntryDialog ted(appGetMainWindow(), U(prompt), U(title), U(text),
wxOK | wxCANCEL);
if (wxID_OK == ted.ShowModal()) { ... }

When the message prompt is relatively short, everything works as
expected. The dialog pops up, the initial text is selected. When typing
a new text, the initial inplut is deleted and replaced by what's typed
since it was all selected, as expected.

However, when the message prompt is onger and when the initial input is
non-empty and relatively short, the initial input is no longer selected,
or not entirely, causing the text typed to be prepended to the initial
text or only partially replaced, instead of being fully replaced.
It isn't a big deal, but it's still surprising for several Jaws or NVDA
screen reader users who reported it.

The definition of what's a short and what's a longer message prompt
isn't clearly defined, and after several tests, isn't the same for all
users who tried to help. It also changed when changing screen
resolution. For example OK with a prompt message of 53 characters long,
but not with 66.
So I suspect it to be dependent on screen size, font size, or maybe the
fact that the message has or not to be displayed on several lines.

Is that a bug of WXWidgets, or am I missing something ?

I don't want to explicitely set a size for the dialog, and leave the
system decide automatically. Maybe the problem is there ?
If I have to set an explicit size to fix the problem, what do you
recommend ? As a reminder, I'm blind myself, so I don't care about it
myself and don't have any idea of what I should set for a size at all so
that it will looks acceptable.

Thank you very much for your help

Igor Korot

unread,
Aug 23, 2026, 1:58:42 AMAug 23
to wx-u...@googlegroups.com
Hi,
Do you see the same issue with the dialogs sample?

Also - what resolution did you try and what size of prompt?

Thank you.
> --
> Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
> ---
> You received this message because you are subscribed to the Google Groups "wx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wx-users+u...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/wx-users/e6333650-f470-44eb-9744-f5f7ead591b0%40bluewin.ch.

Vadim Zeitlin

unread,
Aug 23, 2026, 12:59:55 PMAug 23
to wx-u...@googlegroups.com
On Sun, 23 Aug 2026 06:55:02 +0200 Quentin Cosendey wrote:

QC> I have a small accessibility issue concerning wxTextEntryDialog, and a
QC> few users have noticed and asked about it, so I'm forwarding it here.
QC> I'm using wxWidgets 3.3 under Windows 10 and 11.
QC>
QC> wxTextEntryDialog ted(appGetMainWindow(), U(prompt), U(title), U(text),
QC> wxOK | wxCANCEL);
QC> if (wxID_OK == ted.ShowModal()) { ... }
QC>
QC> When the message prompt is relatively short, everything works as
QC> expected. The dialog pops up, the initial text is selected. When typing
QC> a new text, the initial inplut is deleted and replaced by what's typed
QC> since it was all selected, as expected.
QC>
QC> However, when the message prompt is onger and when the initial input is
QC> non-empty and relatively short, the initial input is no longer selected,

Sorry, I have no idea how could this happen, I'd really need some way of
reproducing this to be able to debug it.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
https://www.tt-solutions.com/

Igor Korot

unread,
Aug 23, 2026, 1:10:04 PMAug 23
to wx-u...@googlegroups.com
Hi, Vadim,

On Sun, Aug 23, 2026 at 11:59 AM Vadim Zeitlin <va...@wxwidgets.org> wrote:
>
> On Sun, 23 Aug 2026 06:55:02 +0200 Quentin Cosendey wrote:
>
> QC> I have a small accessibility issue concerning wxTextEntryDialog, and a
> QC> few users have noticed and asked about it, so I'm forwarding it here.
> QC> I'm using wxWidgets 3.3 under Windows 10 and 11.
> QC>
> QC> wxTextEntryDialog ted(appGetMainWindow(), U(prompt), U(title), U(text),
> QC> wxOK | wxCANCEL);
> QC> if (wxID_OK == ted.ShowModal()) { ... }
> QC>
> QC> When the message prompt is relatively short, everything works as
> QC> expected. The dialog pops up, the initial text is selected. When typing
> QC> a new text, the initial inplut is deleted and replaced by what's typed
> QC> since it was all selected, as expected.
> QC>
> QC> However, when the message prompt is onger and when the initial input is
> QC> non-empty and relatively short, the initial input is no longer selected,
>
> Sorry, I have no idea how could this happen, I'd really need some way of
> reproducing this to be able to debug it.

Did you see his reply to my message?

Thank you.

Quentin Cosendey

unread,
Aug 23, 2026, 4:15:51 PMAug 23
to wx-u...@googlegroups.com
Hello,


It seems that my reply to Igor of this morning didn't properly go
through. Please excuse if you got it twice.



Yes, I can reproduce the problem in the dialogs sample.

With the contents by default  present in dialogs.cpp, it works fine. But
if I change around lines 1175 by this:

    wxTextEntryDialog dialog(this,
                             "This is a long, long, very long message
prompt, just to ask you simply to enter a small string",
                             "TextEntryDialog",
                             "test",
                             wxOK | wxCANCEL);

Then the default value "test" isn't automatically selected, and so if I
type "fff", it results in "ffftest".

My screen resolution is 1366x768 currently. Since I'm blind, I can't
tell you if the prompt is properly and entirely displayed, nor if it
takes multiple lines. It is perfectly read by the screen reader.

Vadim Zeitlin

unread,
Aug 23, 2026, 5:15:32 PMAug 23
to wx-u...@googlegroups.com
On Sun, 23 Aug 2026 22:15:39 +0200 Quentin Cosendey wrote:

QC> It seems that my reply to Igor of this morning didn't properly go
QC> through. Please excuse if you got it twice.

No, it didn't get to the list, you might have sent it only to him
personally.

QC> Yes, I can reproduce the problem in the dialogs sample.
QC>
QC> With the contents by default  present in dialogs.cpp, it works fine. But
QC> if I change around lines 1175 by this:
QC>
QC>     wxTextEntryDialog dialog(this,
QC>                              "This is a long, long, very long message
QC> prompt, just to ask you simply to enter a small string",
QC>                              "TextEntryDialog",
QC>                              "test",
QC>                              wxOK | wxCANCEL);
QC>
QC> Then the default value "test" isn't automatically selected, and so if I
QC> type "fff", it results in "ffftest".

I do see this as well. But the problem is that the default value is never
selected for me, even with the default values, i.e. with the unmodified
sample. So now the question becomes why is it selected for you?

Quentin Cosendey

unread,
Aug 24, 2026, 1:08:10 PMAug 24
to wx-u...@googlegroups.com, Vadim Zeitlin
Hello,


VZ>  I do see this as well. But the problem is that the default value is
never selected for me, even with the default values, i.e. with the
unmodified sample. So now the question becomes why is it selected for you?


Is it never selected for you ? Even if you Tab and Shift+Tab back in the
text field ?
Because if I do so, then the content is always correctly fully selected.
That's the workaround I found for now.

Before asking here, I was wondering if this behavior could be screen
reader specific, but I don't think so, because I observe the same
behavior with Jaws, NVDA, and even with Narrator, on both Windows 10 and 11.

So I actually don't know at all how it could be different for you and
for me.

Thank you.

Vadim Zeitlin

unread,
Aug 24, 2026, 1:22:05 PMAug 24
to wx-u...@googlegroups.com
On Mon, 24 Aug 2026 19:07:57 +0200 Quentin Cosendey wrote:

QC> Is it never selected for you ? Even if you Tab and Shift+Tab back in the
QC> text field ?

It does get selected when getting focus via Tab. But not initially.

I'm not sure if the current behaviour is intentional, to be honest... We
discussed this multiple times in the past but I don't remember what the
conclusion was. But what seems really weird to me is that it seems to
behave differently for you and me, I have no explanation for this right
now.
Reply all
Reply to author
Forward
0 new messages