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

[EuiSuperSelect] Fix regenerating and missing IDs #5197

Merged
merged 6 commits into from
Sep 20, 2021

Conversation

cee-chen
Copy link
Member

@cee-chen cee-chen commented Sep 16, 2021

Summary

  • Fixes an accessibility ID that regenerates on component rerender
  • Fixes an unnecessary aria-labelledby that renders as undefined

Related parent PR:

Checklist

N/A, internal/tech debt only - changelog will be in parent #5195 PR

Copy link
Contributor

@1Copenut 1Copenut left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member Author

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

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

QA

@@ -108,7 +108,7 @@ export const EuiSuperSelectControl: <T extends string>(
side: 'right',
};

const screenReaderId = htmlIdGenerator()();
const screenReaderId = useGeneratedHtmlId();
Copy link
Member Author

Choose a reason for hiding this comment

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

Before:

After:

src/components/form/super_select/super_select_control.tsx Outdated Show resolved Hide resolved
@cee-chen
Copy link
Member Author

Hahaha sorry, you're too fast! I was still slowly writing up my comments 😂 🐢

@1Copenut
Copy link
Contributor

Hahaha sorry, you're too fast! I was still slowly writing up my comments 😂 🐢

My apologies, I should have taken a pause before approving. I took a second look after I saw your comment and responded in kind.

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5197/

@cee-chen cee-chen enabled auto-merge (squash) September 20, 2021 17:00
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5197/

@cee-chen cee-chen merged commit 17e44b6 into elastic:master Sep 20, 2021
@cee-chen cee-chen deleted the use-generated-html-id-super-select branch September 20, 2021 17:32
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.

3 participants