Skip to content

Commit

Permalink
Fixed #916 - Add ariaCloseIconLabel prop to Dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Jun 21, 2019
1 parent a2d8a45 commit 988e268
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/dialog/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export class Dialog extends Component {
baseZIndex: 0,
maximizable: false,
blockScroll: true,
iconsTemplate: null
iconsTemplate: null,
ariaCloseIconLabel: 'Close'
}

static propTypes = {
Expand All @@ -51,7 +52,8 @@ export class Dialog extends Component {
baseZIndex: PropTypes.number,
maximizable: PropTypes.bool,
blockScroll: PropTypes.bool,
iconsTemplate: PropTypes.func
iconsTemplate: PropTypes.func,
ariaCloseIconLabel: PropTypes.string
};

constructor(props) {
Expand Down Expand Up @@ -234,7 +236,7 @@ export class Dialog extends Component {
renderCloseIcon() {
if (this.props.closable) {
return (
<button className="p-dialog-titlebar-icon p-dialog-titlebar-close p-link" onClick={this.onClose}>
<button className="p-dialog-titlebar-icon p-dialog-titlebar-close p-link" aria-label={this.props.ariaCloseIconLabel} onClick={this.onClose}>
<span className="p-dialog-titlebar-close-icon pi pi-times"></span>
</button>
);
Expand Down

0 comments on commit 988e268

Please sign in to comment.