Skip to content

Commit

Permalink
Operate Dialog in open mode to ensure accessible focus behavior (#15502)
Browse files Browse the repository at this point in the history
* operate dialog in open mode to ensure accessible focus behavior is supported

* Change files
  • Loading branch information
chrisdholt authored Oct 14, 2020
1 parent 850d56c commit 5babd0e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "patch",
"comment": "operate dialog in open mode to ensure accessible focus behavior is supported",
"packageName": "@fluentui/web-components",
"email": "chhol@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-10-13T22:51:52.037Z"
}
2 changes: 2 additions & 0 deletions packages/web-components/src/dialog/dialog.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { FluentDesignSystemProvider } from '../design-system-provider';
import DialogTemplate from './fixtures/dialog.html';
import DialogFastButtonsTemplate from './fixtures/dialog-button-test.html';
import { FluentDialog } from './';

// Prevent tree-shaking
Expand All @@ -11,3 +12,4 @@ export default {
};

export const Dialog = (): string => DialogTemplate;
export const DialogButtonTest = (): string => DialogFastButtonsTemplate;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<fluent-design-system-provider use-defaults>
<fluent-dialog id="foo" aria-label="Simple dialog" modal="true">
<h2>Dialog with text and fluent buttons. The first button should receive focus</h2>
<fluent-button tabindex="0" id="element">Button Text</fluent-button>
<fluent-button tabindex="0" id="element">Button Text</fluent-button>
</fluent-dialog>
</fluent-design-system-provider>
3 changes: 0 additions & 3 deletions packages/web-components/src/dialog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ import { DialogStyles as styles } from './dialog.styles';
name: 'fluent-dialog',
template,
styles,
shadowOptions: {
mode: 'closed',
},
})
export class FluentDialog extends Dialog {}

Expand Down

0 comments on commit 5babd0e

Please sign in to comment.