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.
This change adds a new option -
keyboardAccessible, which makes the editor buttons respond to keyboard inputs (e.g. tab, enter), helping it to comply with accessibility requirements.This change addresses the following issues:
tabindex="-1".tab, it would instead focus the next button along (ordered list in the example below) and not hit the dropdown until later. This was caused by the markup for the dropdown not being placed immediately after the associated button.Note - I didn't adjust the project's styles in this PR, but did notice that there is no visible change to the dropdown items when they are focused, I addressed this in our own styles but wasn't sure how you'd like to style it (colours etc.) so left it as is for now. For reference we did something like this in our own styles:
To test simply create an editor instance with the
keyboardAccessibleoption passed in and then see that the buttons behave correctly when using thetabandenterkeys.Addresses #1280 and #1101.