Fix ARIA labels for all anchors with href="#"
; adds aria-pressed
information for toggles
#1262
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.
This follows up from #1259 and closes #1261. Basically, this PR accomplishes the two items discussed in the issue:
href="#"
), I've replaced them with a semantic<button>
.btn-reset
class pulling out the reset from Add ARIA roles and labels to search, header, logo, mobile menu button, and main content #1259, so there's no visual changearia-pressed
property that is updated as the button is clickedI've also slightly modified some of the
aria-label
s to make them more consistent. Observe that we shouldn't update these as the button is clicked; screen readers use thearia-pressed
property to add an annotation to each button.To test this,
aria-label
andaria-pressed
, as well as otherwise work as intendedaria-pressed
role changing as this is donearia-pressed
has a correct default wrt whether or not the page is activearia-pressed
site.search.button
needs to be enabled in the_config.yml
. To test this, locally clone the repo, change the flag, and observe that the button still works as intended + has no visual regressions._config.yml
, and observe the same behaviour for the sidebar children/grandchildren above