-
Notifications
You must be signed in to change notification settings - Fork 84
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(popover-container): ensure component is accessible by screen readers #7153
base: master
Are you sure you want to change the base?
Conversation
Adds hasFullWidth flag to enable fullWidth Button behaviour and remove the default 100% width on the component.
…yling Fixes styling issues on a Form with stickyFooter within a PopoverContainer, adds border-radius and overflow styling so that form content can render as a scrollable container. Also prevents tabbing onto the form element.
…ally Exposes `focusButton` method to allow consumers to programmatically focus on the open button using ref.
@@ -86,7 +86,7 @@ You can easily use many different components to create your own composition. | |||
### Filter component | |||
|
|||
If you want to use the `PopoverContainer` to create for example `Filter` component. | |||
You can do it easly in this way: | |||
You can do it easily in this way: |
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.
praise(non-blocking): Well spotted.
@@ -391,15 +389,15 @@ describe("opening the popup", () => { | |||
}, | |||
); | |||
|
|||
it("open button still has focus after popup is opened", async () => { | |||
it("focus moves to dialog when popup is opened", async () => { |
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.
nitpick/suggestion: Just changing a word around to make the test description make grammatical sense.
it("focus moves to dialog when popup is opened", async () => { | |
it("moves focus to dialog when popup is opened", async () => { |
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 👍
The component renders the popup within a Portal due to potential cascading styles when placed within a MenuItem. To ensure the popup is accessible by screen readers, the dialog will now gain focus when opened. fix #7133
fix #7133
Proposed behaviour
hasFullWidth
prop to enable fullWidth Button behaviour optionally.focusButton
method to enable consumers to programatically focus the open button.Current behaviour
Checklist
d.ts
file added or updated if requiredQA
Additional context
Testing instructions