Skip to content

Commit

Permalink
Fixed screen reader narration of dialogs on Mac.
Browse files Browse the repository at this point in the history
* Add h tag to dialog headers

Added h1 tag to the title in the dialogs and added a new style for this headers

* Update dialog component to use h1 tag for heading

* Update changelog with solve PR

* Added newline
  • Loading branch information
denscollo authored and tonyanziano committed Oct 23, 2019
1 parent ffa96e8 commit 566a579
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [1933](https://github.com/microsoft/BotFramework-Emulator/pull/1933)
- [1934](https://github.com/microsoft/BotFramework-Emulator/pull/1934)
- [1935](https://github.com/microsoft/BotFramework-Emulator/pull/1935)
- [1936](https://github.com/microsoft/BotFramework-Emulator/pull/1936)

- [client] Fixed an issue with the transcripts path input inside of the resource settings dialog in PR [1836](https://github.com/microsoft/BotFramework-Emulator/pull/1836)
- [client] Implemented HTML app menu for Windows in PR [1893](https://github.com/microsoft/BotFramework-Emulator/pull/1893)
Expand Down
8 changes: 8 additions & 0 deletions packages/sdk/ui-react/src/widget/dialog/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,11 @@
outline-color: var(--global-focus-outline-color);
}
}

.dialog-header {
font-family: var(--default-font-family);
font-size: 22px;
font-weight: 200;
margin: 0px 4px 0px 0px;
padding: 0;
}
1 change: 1 addition & 0 deletions packages/sdk/ui-react/src/widget/dialog/dialog.scss.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export const dialog: string;
export const footer: string;
export const cancelButton: string;
export const cancelButtonOutline: string;
export const dialogHeader: string;
6 changes: 3 additions & 3 deletions packages/sdk/ui-react/src/widget/dialog/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ export class Dialog extends Component<ModalProps, {}> {
onKeyDown={this.bodyKeyDownHandler}
role="dialog"
>
<h1 id="dialog-heading" className={`${titleClassName} ${styles.dialogHeader}`}>
{title}
</h1>
<button className={styles.cancelButton} aria-label="Close" onClick={this.props.cancel} />
<div className={styles.cancelButtonOutline} role="presentation"></div>
<header className={`${titleClassName}`} id="dialog-heading">
{title}
</header>
{filterChildren(children, child => hmrSafeNameComparison(child.type, DialogFooter, true))}
{filterChildren(children, child => hmrSafeNameComparison(child.type, DialogFooter))}
</div>
Expand Down

0 comments on commit 566a579

Please sign in to comment.