diff --git a/src/components/overlay/overlay.tsx b/src/components/overlay/overlay.tsx index b5d1dcd1..bb94f99f 100644 --- a/src/components/overlay/overlay.tsx +++ b/src/components/overlay/overlay.tsx @@ -174,7 +174,9 @@ class Overlay extends Component { * @memberof Overlay */ render({type, open, ariaLabel, ariaLabelledBy}: any): VNode { - const ariaProps = ariaLabelledBy ? {'aria-labelledby': ariaLabelledBy} : {'aria-label': ariaLabel}; + const role = type === 'error' ? 'alert' : 'dialog'; + const ariaLive = type === 'error' ? 'polite' : undefined; + const ariaProps = ariaLabelledBy ? { 'aria-labelledby': ariaLabelledBy, 'aria-live': ariaLive } : { 'aria-label': ariaLabel, 'aria-live': ariaLive } const overlayClass = [style.overlay]; if (type) { const classType = style[type + '-overlay'] ? style[type + '-overlay'] : type + '-overlay'; @@ -187,7 +189,7 @@ class Overlay extends Component { } return ( -
+
{this.props.children}
{this.renderCloseButton(this.props)}