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

fix(a11y): stack-view - no proper heading hierarchy maintained in the page #1392

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

andyfeds
Copy link
Contributor

@andyfeds andyfeds commented May 9, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • If applicable, have a visual design approval

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

No proper heading hierarchy maintained in the page in case of a stack-block component, as the role is fixed as "heading".
If a user wants to change or omit the role, they can't, because our current implementation forces the heading role and level.
Issue Number: CDE-1634

What is the new behavior?

The below changes are made as mentioned in the JIRA ticket:

  • If no role is provided, we add role="heading" by default and add the aria-level based on common component usage.
  • The user can change the role or the aria level (if the role is not "heading", we omit the aria-level attribute).
  • If the user decides they don't want the "role" attribute at all, they can pass in an undefined value "undefined" and we won't add the role or aria-level attribute.

A new input clrSbAriaRole is added to the stack-block, so the user can pass/configure the aria role.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@andyfeds andyfeds self-assigned this May 9, 2024
Copy link
Contributor

github-actions bot commented May 9, 2024

👋 @andyfeds,

  • 🙏 The Clarity team thanks you for opening a pull request
  • 🎉 The build for this PR has succeeded
  • 🔍 The PR is now ready for review
  • 🍿 In the meantime, view a preview of this PR
  • 🖐 You can always follow up here. If you're a VMware employee, you can also reach us on our internal Clarity Support space

Thank you,

🤖 Clarity Release Bot

@andyfeds andyfeds requested a review from a team May 9, 2024 10:47
Copy link
Member

@sandeepkulki sandeepkulki left a comment

Choose a reason for hiding this comment

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

Changes are approved

Copy link
Contributor

This PR introduces visual changes: 952f331
If these changes are intended and correct, please cherry-pick the above commit to this PR.

git checkout a11y/CDE-1634
git fetch https://github.com/vmware-clarity/ng-clarity.git 952f33137551130cafe770c1545d01fd49cfd83d
git cherry-pick 952f33137551130cafe770c1545d01fd49cfd83d
git push

@andyfeds andyfeds marked this pull request as draft May 10, 2024 10:23
Copy link
Contributor

This PR introduces visual changes: c636c9d
If these changes are intended and correct, please cherry-pick the above commit to this PR.

git checkout a11y/CDE-1634
git fetch https://github.com/vmware-clarity/ng-clarity.git c636c9d899dea12a6d7ca63f7666c9a00238b805
git cherry-pick c636c9d899dea12a6d7ca63f7666c9a00238b805
git push

Copy link
Contributor

This PR introduces visual changes: 079ec02
If these changes are intended and correct, please cherry-pick the above commit to this PR.

git checkout a11y/CDE-1634
git fetch https://github.com/vmware-clarity/ng-clarity.git 079ec0295681f37805a4eb48b7e4f3c7d2fa378c
git cherry-pick 079ec0295681f37805a4eb48b7e4f3c7d2fa378c
git push

Copy link
Contributor

This PR introduces visual changes: 08f14d1
If these changes are intended and correct, please cherry-pick the above commit to this PR.

git checkout a11y/CDE-1634
git fetch https://github.com/vmware-clarity/ng-clarity.git 08f14d1c83b3a20f6d076cb29038cffbfb0ca489
git cherry-pick 08f14d1c83b3a20f6d076cb29038cffbfb0ca489
git push

Copy link
Contributor

This PR introduces visual changes: 020c3ee
If these changes are intended and correct, please cherry-pick the above commit to this PR.

git checkout a11y/CDE-1634
git fetch https://github.com/vmware-clarity/ng-clarity.git 020c3eee14cce6c3c448369951366b402dd9dc16
git cherry-pick 020c3eee14cce6c3c448369951366b402dd9dc16
git push

@andyfeds andyfeds marked this pull request as ready for review May 14, 2024 07:00
@andyfeds andyfeds changed the title fix(a11y): stack-block - no proper heading hierarchy maintained in the page fix(a11y): stack-view - no proper heading hierarchy maintained in the page May 14, 2024
@andyfeds
Copy link
Contributor Author

Contains breaking changes, will be part of v18 release.

@andyfeds andyfeds marked this pull request as draft May 15, 2024 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants