Skip to content

Commit

Permalink
use group role
Browse files Browse the repository at this point in the history
  • Loading branch information
smhigley committed Sep 21, 2022
1 parent fb689ea commit d4d8c58
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/react-components/react-popover/Spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ Default popover
</div>

// on document.body
<div role="note">
<div role="group">
{/** content */}
</div>
```
Expand Down Expand Up @@ -499,7 +499,7 @@ Accessible markup is divided into two scenarios:
```tsx
// Popover that does not trap focus
<button aria-expanded="false">Trigger</button>
<div role="note">
<div role="group">
No focus trap
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const mount = (element: JSX.Element) => {
};

const popoverTriggerSelector = '[aria-expanded]';
const popoverContentSelector = '[role="note"]';
const popoverContentSelector = '[role="group"]';
const popoverInteractiveContentSelector = '[role="dialog"]';

describe('Popover', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('PopoverSurface', () => {
expect(queryByRole('dialog')).not.toBeNull();
});

it('should set role note if focus trap is not active', () => {
it('should set role group if focus trap is not active', () => {
// Arrange
mockPopoverContext({ trapFocus: false });
const { getByTestId } = render(<PopoverSurface {...props}>Content</PopoverSurface>);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`PopoverSurface renders a default state 1`] = `
class="fui-PopoverSurface"
data-tabster="{\\"deloser\\":{},\\"modalizer\\":{\\"id\\":\\"modal-1\\",\\"isOthersAccessible\\":true}}"
data-testid="component"
role="note"
role="group"
>
Default PopoverSurface
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const usePopoverSurface_unstable = (
},
root: getNativeElementProps('div', {
ref: useMergedRefs(ref, contentRef),
role: trapFocus ? 'dialog' : 'note',
role: trapFocus ? 'dialog' : 'group',
'aria-modal': trapFocus ? true : undefined,
...modalAttributes,
...props,
Expand Down

0 comments on commit d4d8c58

Please sign in to comment.