Improve accessibility for the page base components.
Review Request #10938 — Created March 4, 2020 and submitted
This updates the base template and page-level UI components (top header
bar, search, navigation, and sidebar) to better meet accessibility
standards.We're now using more specific tags for many of thes elements:
- The top bar now uses
<header>
- The navigation areas in the top bar use
<nav>
- The page sidebar uses a standard
<div>
, but is split into a
<header>
,<div>
, and<footer>
for use with the mobile menu - Individual sidebars should now use
<nav>
or<section>
, depending
on what's appropriate for that sidebar - The main content area uses
<main>
Some ARIA roles and labels have been added to parts of these components
in order to provide context to screen readers.
This is not comprehensive, but does improve what we've had quite a bit.
The page now has distinct landmark areas, which can be more easily
accessed when using assistive technologies.
Checked that the page continues to render correctly in all major
browsers.Inspected the landmark areas using a browser extension, verifying the
landmark trees and labels.Also inspected using Firefox's Accessibility tree.
Summary | ID |
---|---|
c835f6427775c3e340bf31ef4db7861a925eda9e |
Description | From | Last Updated |
---|---|---|
I know some people are interpreting <aside> occurring on its own (i.e. outside of <article>) as suitable for something like … |
david |
-
-
reviewboard/static/rb/css/ui/page-sidebar.less (Diff revision 1) I know some people are interpreting
<aside>
occurring on its own (i.e. outside of<article>
) as suitable for something like a page sidebar but it's not explicit in the standard and I think it's highly confusing. I think we should keep this as<div>
.
Change Summary:
- Removed usage of
<aside>
forpage-sidebar
, and in fact any landmarks. - Added landmark information to the actual
rb-c-sidebar
components, recommending<nav>
or<section>
. We'll now make these the landmarks instead, as these are going to have more context as to their purpose, helping screen readers. - Tested the landmarks and navigation with a screen reader. (There's still a lot to do here.)
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commits: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 2 (+146 -76) |