Repository navigation
Conversation
A section of the main menu opens a list of links. It was marked up as an ARIA menu and is not one: the control carried aria-haspopup="true", which means a menu, and the list under it named itself after the control with aria-labelledby on a plain div, which the HTML validator rejects. That is three errors on each of the 253 built pages that carry the menu, and on the home page they are the only errors it has. The way to make them valid is role="menu" on the div and role="menuitem" on each link, and that is a promise this cannot keep. An ARIA menu owes the keyboard arrow keys between the items, a roving tabindex, and Escape to close, and Bootstrap 4 gives none of the three here. A reader who is told it is a menu and then finds a list of links is worse off than one who was told nothing. So two attributes go instead of one arriving. What is left is the disclosure pattern of the ARIA practices, which is what this already is: a control that says whether it is open, and the content it shows. role="button" and aria-expanded stay and carry it. The id of the control goes with the label, because nothing else read it. Measured over the whole build, leaving the frozen copies under /archives/ out: 759 divs took aria-labelledby with no role, 3 on each of 253 pages, and there are none now. 7 aria-haspopup per page become none. No aria-labelledby anywhere pointed at a missing id before or after, which is the other half of the same item of #190, fixed earlier. The menu still works: the three sections open and close on a click, the control flips aria-expanded between true and false, and the first section shows its 10 links.
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A section of the main menu opens a list of links. It was marked up as an ARIA menu and is not one: the control carried
aria-haspopup="true", which means a menu, and the list under it named itself after the control witharia-labelledbyon a plaindiv, which the HTML validator rejects. That is three errors on each of the 253 built pages that carry the menu, and on the home page they are the only errors it has. This is the open item of #190.The way to make them valid is
role="menu"on the div androle="menuitem"on each link, and that is a promise this cannot keep. An ARIA menu owes the keyboard arrow keys between the items, a roving tabindex, and Escape to close, and Bootstrap 4 gives none of the three here. A reader who is told it is a menu and then finds a list of links is worse off than one who was told nothing.So two attributes go instead of one arriving. What is left is the disclosure pattern of the ARIA practices, which is what this already is: a control that says whether it is open, and the content it shows.
role="button"andaria-expandedstay and carry it. The id of the control goes with the label, because nothing else read it.Measured over the whole build
Leaving the frozen copies under
/archives/out:divwitharia-labelledbyand norolearia-haspopuparia-labelledbypointing at a missing idThe dangling id, the other half of the same #190 item, was fixed earlier.
The menu still works
Driven in Chromium: the three sections open and close on a click, the control flips
aria-expandedbetweentrueandfalse, and the first section shows its 10 links.