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

[Navigation] Navigation does not specify currently active item for screen readers #585

Closed
jakublamprecht opened this issue May 13, 2019 · 2 comments
Assignees
Labels
enhancement New feature, or improvement to an existing feature.
Milestone

Comments

@jakublamprecht
Copy link
Contributor

Bug Report

Current Behavior
Navigation component does not provide information about currently active item/link for screen readers as suggested by W3C here:

https://www.w3.org/WAI/tutorials/menus/structure/#indicate-the-current-item
https://www.w3.org/WAI/tutorials/menus/structure/#using-wai-aria

Expected behavior/code
Navigation component provides the user with information about currently active item/link.

Environment

  • Core Components version 2.3.0

Possible solution
In itemContent.html:

<a href="${item.URL}"
     title="${item.title}"
     data-sly-attribute.aria-current="${item.active && 'page'}"
     class="cmp-navigation__item-link">
    ${item.title}
</a>
@richardhand
Copy link
Contributor

richardhand commented May 13, 2019

Thanks @jakublamprecht for the suggestion, this makes sense. Please feel free to go ahead and create a pull request. One point, I don't believe you need to use data-sly-attribute in your example.

@richardhand richardhand added the enhancement New feature, or improvement to an existing feature. label May 13, 2019
@jakublamprecht
Copy link
Contributor Author

That's right @richardhand, works the same without data-sly-attrbiute

@richardhand richardhand added the good first issue Good starter issue for new contributors. label May 15, 2019
@bpauli bpauli self-assigned this May 15, 2019
@bpauli bpauli removed the good first issue Good starter issue for new contributors. label May 15, 2019
@bpauli bpauli closed this as completed in bb62a15 May 16, 2019
@bpauli bpauli added this to the 2.5.0 milestone May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, or improvement to an existing feature.
Projects
None yet
Development

No branches or pull requests

3 participants