Skip to content

Tell a field's Tab handler when the default order is wanted - #361

Open
rezabakhshilaktasaraei wants to merge 1 commit into
desktop-app:masterfrom
rezabakhshilaktasaraei:field-tab-default-order
Open

Tell a field's Tab handler when the default order is wanted#361
rezabakhshilaktasaraei wants to merge 1 commit into
desktop-app:masterfrom
rezabakhshilaktasaraei:field-tab-default-order

Conversation

@rezabakhshilaktasaraei

Copy link
Copy Markdown
Contributor

Several boxes wire Tab between their fields by hand (poll: question → answers → back; checklist, "Edit your name", "Add link" likewise). The buttons around the fields are not focusable, so nothing was lost — until screen reader mode, where those buttons and settings are Tab stops and the ring closed on the fields keeps the keyboard from ever reaching them.

InputField::TabbedRequest gets a defaultOrder flag, set by the field itself in screen reader mode. A handler that would only pass the focus on to another field leaves such a request alone and the field falls back to the default traversal; a handler that uses Tab for something else (accepting an autocomplete suggestion) goes ahead as before.

The tdesktop side (poll, checklist, name and link boxes) builds on this.

The fields of a box pass Tab on to one another - question, answers and
back to the question - with the buttons around them never focusable, so
nothing was lost. In screen reader mode those buttons are Tab stops, and
the ring closed on the fields keeps the keyboard from ever reaching
them. Every box wrote the same escape by hand.

Let the field decide instead: the request it fires for Tab now says
whether the default focus order is wanted - in screen reader mode it
is - and a handler that would only pass the focus on to another field
leaves such a request alone, while one that uses Tab for something else,
like accepting a suggestion, goes ahead as usual.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant