ckeditor4
ckeditor4 copied to clipboard
Screen readers in browse mode can navigate outside of dropdowns to random elements
Type of report
Bug
Provide detailed reproduction steps (if any)
- Go to https://ckeditor.com/ckeditor-4/demo/#document.
- Enable screen reader.
- Focus or Tab to editor content.
- Press Alt + F10 to navigate to editor toolbar.
- Press Tab until the font toolbar group is focused.
- Press Down or Right arrow to reach Size dropdown.
- Press Enter to open dropdown. Focus moves to the first option in the dropdown.
- Ensure screen reader is in browse mode.
- Press Up arrow repeatedly to navigate contents.
Expected result
Screen reader does not navigate out of dropdown. Or, it navigates to the button that triggered the dropdown.
Actual result
Screen reader navigates to bottom of DOM.
Other details
Screen readers in browse-mode allow users to navigate the DOM without restrictions. And the dropdown element is placed on the end of DOM tree which makes screen reader to navigate to other elements than dropdown button.
Possible solutions
- Add
aria-modalto the dropdown container. This may not work for all screen readers because the spec says Assistive technologies MAY limit navigation to the modal element's contents. (https://www.w3.org/TR/wai-aria-1.1/#aria-modal) - When the dropdown is opened, add
aria-hiddento all children of<body>, except the dropdown. - Insert the dropdown as a sibling or an immediate child of the button that opens it. This way, even if screen reader users navigate outside the dropdown, they will land on adjacent DOM elements and not some far away place.
- Browser: All
- OS: All
- CKEditor version: 4.5.0+
- Installed CKEditor plugins:
font,stylescombo