Tell a field's Tab handler when the default order is wanted - #361
Open
rezabakhshilaktasaraei wants to merge 1 commit into
Open
Tell a field's Tab handler when the default order is wanted#361rezabakhshilaktasaraei wants to merge 1 commit into
rezabakhshilaktasaraei wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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::TabbedRequestgets adefaultOrderflag, 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.