-
Notifications
You must be signed in to change notification settings - Fork 58
FORMS-18673: Visual heading text is not marked as heading @sunnym @vavarshn #1563
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
base: dev
Are you sure you want to change the base?
Conversation
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.
how level is being decided as there can be container inside container
|
||
const bemClass = Array.from(this.element.classList).filter(bemClass => !bemClass.includes('--'))[0]; | ||
if (bemClass && this.label.parentElement.classList.contains(`${bemClass}__label-container`)) { | ||
this.label.setAttribute(Constants.ROLE, "heading"); |
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.
role="heading" is not required on a label container. Labels are already accessible using the for attribute and the corresponding id.
const bemClass = Array.from(this.element.classList).filter(bemClass => !bemClass.includes('--'))[0]; | ||
const labelContainer = this.element.querySelector(`.${bemClass}__label-container`); | ||
if (labelContainer) { | ||
labelContainer.querySelector("label").setAttribute(Constants.ROLE, "heading"); |
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.
role="heading" is not required on a label container. Labels are already accessible using the for attribute and the corresponding id.
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 check comments
Hello @amit-mnnit ! Also, the description of FORMS-18673 suggests this fix: In the description, you can also find these reference links: Please review and let me know if the fix is fine. |
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: