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
Bug 1885702: Cypress: Fix 'aria-hidden-focus' accesibility violations #6910
Bug 1885702: Cypress: Fix 'aria-hidden-focus' accesibility violations #6910
Conversation
@dtaylor113: This pull request references Bugzilla bug 1885702, which is valid. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@dtaylor113: This pull request references Bugzilla bug 1885702, which is valid. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
1 similar comment
@dtaylor113: This pull request references Bugzilla bug 1885702, which is valid. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
Thanks @dtaylor113
@@ -51,6 +51,7 @@ class DeleteNamespaceModal extends PromiseComponent { | |||
className="pf-c-form-control" | |||
onKeyUp={this._matchTypedNamespace} | |||
placeholder="Enter name" | |||
aria-label="Enter name of namespace to delete" |
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.
aria-label="Enter name of namespace to delete" | |
aria-label={`Enter the name of the ${this.props.kind.label} to delete`} |
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.
Fixed, ty
@dtaylor113: This pull request references Bugzilla bug 1885702, which is valid. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
…t instead of 'modal-container'. setAppElement(...) will set 'aria-hidden=true' in attempt to hide app behind the open modal.
d8a54b0
to
4a148a9
Compare
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dtaylor113, spadgett The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
Really great work on this, @dtaylor113!!! 🎉 I just tested this in VO, and it's significantly better than before. Before these changes, I was unable to interact with the modal outside of the input. I could not navigate to the header, the text, or the footer buttons- I was only able to interact with the input which did not give much context to what was happening either. I was also able to interact with the rest of the page which should have been hidden from the user while interacting with the modal. With these changes, when the user opens the modal now, they aren't confused by the rest of the page, and you added more context with the aria label. My focus goes to the input, it explains what I should do, and if I want more info, I can go up and read the rest of the modal. Awesome update! 😄 |
@jessiehuff Thanks! Really cool that you can experience what these changes actually do. :-) |
/refresh |
@dtaylor113: All pull requests linked via external trackers have merged: Bugzilla bug 1885702 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/cherry-pick release-4.6 |
@spadgett: new pull request created: #6931 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Root cause was the
<div id="modal-container">...</div>
was getting aaria-hidden=true
attribute which hide it and it's children (modal header, footer, body) from accesibility tools. A11y violation due to form fields within modal could have focus, but they were hidden.Changed element passed to
react-modal
'ssetAppElement(...)
to be 'app-container' instead of 'modal-container'.setAppElement(...)
will setaria-hidden=true
for the element (and all it's children!) and 'hide' them from accesibility tools. This is done in order to 'hide' app elements behind the open modal, and will toggle/removearia-hidden
once the modal is closed. So previously settingAppElement
to the modal was hiding the modal and it's contents from accesiblity tools! This fix requiresapp-container
andmodal-container
to be sibling elements, and not child-parent.This fix allowed the modal contents to be included in accesibility tools and thus, once fixed, raised another violation:
This required adding
aria-label
to a form element.This PR will also cause the CI to fail upon detection of a11y violations!!
Running
test-cypress.sh
reported no a11y violoations, so going forward, any violations will need to be fixed prior to PR merge.CC @jessiehuff