Skip to content

Conversation

@generalmimon
Copy link
Member

This pull request addresses accessibility issues identified by the HAN University of Applied Sciences as part of an accessibility audit. The work is financially supported by the NLnet Foundation.

See ajaxorg/ace#5114

When the text cursor is in the editor, the user can now press the Esc
key to exit the editor. Pressing the Enter key when the focus ring is
visible around the editor will enter the editor again.
This is necessary to be able to control the file tree using the
keyboard. Before this commit, the file tree could be navigated using the
arrow keys, but when selecting a file by pressing Enter, nothing
happened other than highlighting the file tree item with a blue
background. It was simply impossible to open a file without a mouse,
because you need a mouse to trigger a double-click event. Now a file
will open as soon as the corresponding file tree entry is selected, so
pressing Enter opens the file.

A side effect is that a single click (instead of a double-click) is now
enough to open a file. I don't think this is a problem - it matches the
behavior of the file tree in Visual Studio Code, for example.
Until now, the overflowing content in the "info panel" and "converter"
(at higher zooms, or generally if their dedicated space is too small)
has been cut off and inaccessible (this is because GoldenLayout
containers have `overflow: hidden` by default). Now a scrollbar appears
if needed.
@generalmimon generalmimon marked this pull request as draft October 27, 2024 23:00
The [modal](https://getbootstrap.com/docs/3.4/javascript/#modals)
component in Bootstrap 3.4.1 that we were using to display
modals/dialogs until now had some weird behavior in terms of moving
focus using the keyboard. When moving the focus forward using the Tab
key, it would cycle through the links inside the About modal as
expected. Except that after the Close button, the focus would go to a
"hidden place" (which was actually the entire `div.modal` element)
before the first link in the modal would be focused again. When moving
the focus backward using Shift+Tab, the focus would move from the first
link to the browser address bar, not to the last element (the Close
button in the case of the About modal) as expected.

The [`a11y-dialog`](https://a11y-dialog.netlify.app/) library is
specifically designed to fix accessibility issues like this, so now we
only use some of Bootstrap styles for modal contents, but we no longer
use any Bootstrap JS code to display the modal. Instead, showing/hiding
the modal is now left entirely to `a11y-dialog`.
@generalmimon generalmimon marked this pull request as ready for review December 21, 2024 09:15
This was done mainly for the "@kaitai_io" link in the About modal.

Uses the fix from microsoft/vscode#38948
`tabindex="-1"` has been removed from context menu items, allowing
navigation between them using the Tab key.

Context menus are now wrapped in a "dialog window" using the
`a11y-dialog` library. This ensures that the Tab key (and the Shift+Tab
key combination) only moves the focus between items in the currently
open context menu. The Esc key closes the context menu. When the context
menu is opened, the entire browser window is covered with a transparent
layer, and clicking on it also closes the context menu.
@generalmimon
Copy link
Member Author

For the record, here is the report from the aforementioned accessibility audit that this pull request addresses:
HAN Accessibility Report Kaitai Web IDE.pdf

To the best of my knowledge, all identified issues have been addressed except for this sub-item of issue 5:

  1. You can’t reach large parts of the website when using the keyboard. By using ‘tab’ on your keyboard, you should be able to cycle through all interactive elements on the page.

    • (...)
    • The other panels appear to be unreachable by keyboard.

The reason is that panels and tabs in Web IDE are handled by the Golden Layout library, which apparently does not implement any form of keyboard accessibility. Implementing it would likely require a significant amount of effort and time, which was considered out of scope.

@generalmimon generalmimon merged commit 25f91a7 into master Jul 26, 2025
1 check passed
@generalmimon generalmimon deleted the accessblty branch July 26, 2025 20:26
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.

2 participants