Enable accessibility and item registration for the formatting toolbar.

Review Request #13212 — Created Aug. 14, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

This updates the HTML for the formatting toolbar to ensure it's
accessible, enabling screen readers to understand the groups and items
on the toolbar in order to communicate it to the user, and to enable
keyboard navigation. This involves setting ARIA attributes and using
<button> instead of <a>.

Items are now registered dynamically instead of hard-coded. This is both
to ensure consistent HTML (particularly with accessibility) and to later
allow extensions to add buttons to the toolbar (which was an original
goal of the project).

This does make one minor change to the toolbar contents, which is to mov
the Code button alongside Bold/Italic/Strikethrough. This is because
it's just setting an inline style like those (it's a code literal, not a
code block), and has more in common with those than linking/uploading
media.

Tested all of the toolbar functionality. It all works (except for image
uploads, which is a known problem already).

Commits

Files

    Loading...