diff options
author | 2021-07-22 19:12:37 -0500 | |
---|---|---|
committer | 2021-07-22 19:12:37 -0500 | |
commit | 4fd6cfe668e8aaf3f92817379fc8e123a6caf24f (patch) | |
tree | bff152867cea51138825b7c1aed539ebdaed7616 /docs/src/components | |
parent | 7b600d597bb2c2f95c8faeedc47b4d4b27c397a7 (diff) | |
download | astro-4fd6cfe668e8aaf3f92817379fc8e123a6caf24f.tar.gz astro-4fd6cfe668e8aaf3f92817379fc8e123a6caf24f.tar.zst astro-4fd6cfe668e8aaf3f92817379fc8e123a6caf24f.zip |
📘 DOC: improve a11y (#806)
* Add `tabindex="0"` to `<pre>` so that they are navigable by keyboard users if they overflow.
* Landmark elements should have unique names https://dequeuniversity.com/rules/axe/4.3/landmark-unique
* Page must have one main landmark https://dequeuniversity.com/rules/axe/4.3/landmark-one-main
- Main landmark must not be contained by another landmark https://dequeuniversity.com/rules/axe/4.3/landmark-main-is-top-level
* Heading level cannot increase by more than one
* Ensure that links with the same accessible name serve a similar purpose
https://dequeuniversity.com/rules/axe/4.3/identical-links-same-purpose
* Just update the accessible name and require context for the visible link name
* Fix CSS from the removal of the second <main>
* Revert heading level change
Diffstat (limited to 'docs/src/components')
-rw-r--r-- | docs/src/components/DocSidebar.tsx | 2 | ||||
-rw-r--r-- | docs/src/components/SiteSidebar.astro | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/src/components/DocSidebar.tsx b/docs/src/components/DocSidebar.tsx index 6aacb3860..92f34ff61 100644 --- a/docs/src/components/DocSidebar.tsx +++ b/docs/src/components/DocSidebar.tsx @@ -28,7 +28,7 @@ const DocSidebar: FunctionalComponent<{ headers: any[]; editHref: string }> = ({ }, []); return ( - <nav class="sidebar-nav"> + <nav class="sidebar-nav" aria-labelledby="sidebar-content"> <div class="sidebar-nav-inner"> <h2 class="heading">On this page</h2> <ul> diff --git a/docs/src/components/SiteSidebar.astro b/docs/src/components/SiteSidebar.astro index 05779e882..6503c0414 100644 --- a/docs/src/components/SiteSidebar.astro +++ b/docs/src/components/SiteSidebar.astro @@ -3,7 +3,7 @@ import { sidebar } from '../config.ts'; const {currentPage} = Astro.props; --- -<nav> +<nav aria-labelledby="sidebar-site"> <ul class="nav-groups"> {sidebar.map(category => ( <li> |