-
Notifications
You must be signed in to change notification settings - Fork 138
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
Fix navigation menu going over the headings when navigating to them #188
Open
luontola
wants to merge
2
commits into
codefreezefi:gh-pages
Choose a base branch
from
luontola:top-margin-fix
base: gh-pages
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please don't change the semantics, the h3 and nav serve a purpose here.
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.
I changed them because they use semantic elements in a non-standard way, which would confuse visually impaired people.
When somebody with a screen reader goes to the site, they will hear the Participants section and it containing an unordered list. Going through the list items, first they will hear there is a picture of the participant, but then suddenly inside the list item there starts a new section (whose heading is the participant's name), but the section contains no text, but is followed by navigation menu, which doesn't contain links to navigate the website, but links to the participant's social media.
Headings and lists can both be used to organize the page content. A heading starts a new section and the section can contains a list, but it is unheard of that a list would contain headings/sections.
https://webaim.org/techniques/semanticstructure/ says about headings:
When skimming through the headings with a screen reader, it would have 20-30 participant names in the outline, which slows down the skimming and is confusing because the sections don't have any other content than the heading, so the headings are the content.
Some tools for seeing the outline are https://gsnedders.html5.org/outliner/ and https://wave.webaim.org/ or disabling all CSS and images in the browser. Seems that I didn't remove all elements with inappropriate semantics. There is a weird
<h2 id="in-brief">In brief:</h2>
in the HTML, as can be seen from the outline, but it's not visible on the page.Then about the nav element/navigation landmark role.
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Navigation_Role says:
and https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_HTML_sections_and_outlines explictly says:
As final words, at https://internetingishard.com/html-and-css/semantic-html/ was said appropriately:
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.
Oh, right, that makes a lot of sense.