-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A11y: use appropriate HTML heading markup for headings #2223
A11y: use appropriate HTML heading markup for headings #2223
Conversation
- make size/weight match regular text - remove the theming, as it will inherit this anyway from its surroundings/container; having the color explicitly defined here creates issues as it's more specific otherwise and overrides the local context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrickhlauke Thank you again for a great contribution. Did you change any files in jslib? Maybe it's just pointing to an old commit hash in jslib.
Will try and review in the next couple of days
@djsmith85 my knowledge of git is fairly primitive, and yes the jslib thing keeps popping back up as being modified even though i keep doing upstream git pulls and clean npm installs etc which i would have thought fix this. but i'm probably missing something... short answer: no i didn't change anything in jslib. if you can give me a pointer on how i could fix it here, i'd be happy to update this PR so it's clean |
ah, a bit of stackoverflowing tells me that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrickhlauke I've just had a look at your changes and tested these with NVDA on Windows. These are looking very good. Just a minor thing with the export component.
Regarding the jslib changes. You branch is pointing to an older version of jslib. Updating your branch with browsers-current master should set it to commit jslib @ 8fc3cf5.
The changes will look something like this:
diff --git a/jslib b/jslib
index 24fe8360..8fc3cf50 160000
--- a/jslib
+++ b/jslib
@@ -1 +1 @@
-Subproject commit 24fe836032354d4ec39435776e54dd0995e1b389
+Subproject commit 8fc3cf50d2967212ffbbf0d57cac71d0774aa2a8
Then stage the jslib-file, commit and push it. This should resolve it.
If you have any issues or need assistance let me know.
done it i think |
…eading styles Essentially, a late port to desktop of aspects from bitwarden#2223 (which I hadn't realised at the time also affected the desktop app)
…gs (#3313) * Change box-headers from generic `<div>` to semantic headings, tweak heading styles Essentially, a late port to desktop of aspects from #2223 (which I hadn't realised at the time also affected the desktop app) * Change box headers in modals to `<h1>`s * Fix/normalise modals * Harmonise modal dialog headings, use `aria-labelledby`
Type of change
Objective
Add structural/semantic heading markup when text acts as a heading and is visually styled as a heading, but currently marked up as a generic
<div>
. This will result in assistive technologies/screen readers actually announcing things as headings (e.g. "heading level 1, Settings ... heading level 2, Manage ... heading level 2, Security ..." on the settings view). It also allows screen reader users to quickly navigate by headings (e.g. in NVDA, using theH
key to jump to the next heading directly,Shift+H
to jump to the previous heading).Closes #1987
Code changes
Use
<h1>
and<h2>
elements where appropriate. To make sure there's no visual change, tweaked the main CSS to:color
for headings - this is unnecessary, as headings will inherit the color of their context/parent anyway, and is overly specific, as it will otherwise override/explicitly set the color (and would otherwise necessitate extra styles to make sure heading color is defined for different contexts)Screenshots
Screenshots here to show that there is no actual visual change.
Current (taking settings as an example):
After this PR:
Testing requirements
Suggest testing all screens/views using a screen reader, checking that no text acting as a heading has been missed out, and that visually hidden headings are correctly announced,
Before you submit
npm run lint
) (required)