-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Connectors] A11y refocus manage button #212157
base: main
Are you sure you want to change the base?
[Connectors] A11y refocus manage button #212157
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.
Looking at the issue shouldn't we also focus on an element when we complete the delete action?
Expected Result
Focus should be on Manage button.
After pressing Enter on Delete pipeline, it would be better to have focus on the first element on the page (for this page probably Pipelines tab would be better).
...ublic/applications/enterprise_search_content/components/search_index/pipelines/pipelines.tsx
Show resolved
Hide resolved
...ublic/applications/enterprise_search_content/components/search_index/pipelines/pipelines.tsx
Show resolved
Hide resolved
|
||
const onCloseHandler = () => { | ||
closeDeleteModal(); | ||
setTimeout(() => { |
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.
why do we need to use the setTimeout here?
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.
From what I've read, the action closeDeleteModal re-renders and without the setTimeout the refocus will fail since the DOM hadn't updated yet.
Ahhh yes must have missed this. I think I can just add another button refrence for the Pipelines Tab. |
Summary
As part of Accessibility requirements, a user thats using only the keyboard should be able to know which element they are on at the moment after closing windows. As part of that the 'Ingest Pipelines' page, the 'Manage' button now refocuses once the 'Delete Custom Pipeline' popup is closed. See screenshots below
Closes #196650
Notice that the 'Manage' button is refocused
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breaking
label should be applied in these situations.release_note:*
label is applied per the guidelinesIdentify risks
Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.
Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.