Skip to content
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

Accessibility improvements #462

Merged
merged 1 commit into from
Apr 24, 2024
Merged

Conversation

coliff
Copy link
Contributor

@coliff coliff commented Apr 17, 2024

A minor accessibility improvement:

  • Adds main landmark (this is particularly helpful for screen readers - tested with NVDA on Windows)

Fixes this issue: https://dequeuniversity.com/rules/axe/4.8/landmark-one-main

Note: I didn't add <article> to blog posts in my original commit due to multiple h1s on the page which caused tests to fail.

@XhmikosR
Copy link
Member

This breaks HTML validation, please have a look at tests @coliff

@XhmikosR XhmikosR marked this pull request as draft April 17, 2024 08:23
@coliff
Copy link
Contributor Author

coliff commented Apr 17, 2024

Oh, there are multiple h1s on the homepage. I think we can change the post titles here from h1 to h2s (but add h1 class so styling is the same).

command used: java -jar "/home/runner/work/blog/blog/node_modules/vnu-jar/build/dist/vnu.jar" --asciiquotes --skip-non-html --Werror --filterpattern "Duplicate ID.*|The first occurrence of ID.*|Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.*" _site/

Not sure about that part though, I didn't touch anything with an id.

@XhmikosR
Copy link
Member

Not sure about that part though, I didn't touch anything with an id.

It's not that you touched anything, it's the command we execute when vnu.jar runs :)

@coliff
Copy link
Contributor Author

coliff commented Apr 17, 2024

ah I see now - thanks. Fixing the multiple h1s would take a bit more time (which I don't have right now) as the corresponding CSS for the headings need updating (and the h2s within the article would need to be demoted to h3s etc).

You could either add this error to the skip list and approve/merge as it is or I can come back to it later or maybe I'll remove the part which causes the error. (surprised that changing a div to a main or article would cause the error though).

@coliff coliff force-pushed the dev/coliff/a11y-improvements branch 2 times, most recently from 426f73f to 380c0ca Compare April 23, 2024 15:13
Adds main landmark (this is particularly helpful for screen readers - tested with NVDA on Windows)
@coliff coliff marked this pull request as ready for review April 23, 2024 15:14
@coliff

This comment was marked as outdated.

@julien-deramond julien-deramond self-requested a review April 23, 2024 15:47
Copy link
Member

@julien-deramond julien-deramond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @coliff
LGTM, it's what we do too in the main documentation

@XhmikosR XhmikosR merged commit 37ae94c into twbs:main Apr 24, 2024
8 checks passed
@coliff coliff deleted the dev/coliff/a11y-improvements branch April 24, 2024 09:44
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.

3 participants