Skip to content

Commit

Permalink
Fix aria renderLiveRegion A11yText DOM structure
Browse files Browse the repository at this point in the history
W3C was breaking because of A11yText span wrapping p elements.
  • Loading branch information
avialleton authored and avialleton committed Mar 9, 2020
1 parent d787303 commit 1f965ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-select/src/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -1798,8 +1798,8 @@ export default class Select extends Component<Props, State> {
if (!this.state.isFocused) return null;
return (
<A11yText aria-live="polite">
<p id="aria-selection-event">&nbsp;{this.state.ariaLiveSelection}</p>
<p id="aria-context">&nbsp;{this.constructAriaLiveMessage()}</p>
<span id="aria-selection-event">&nbsp;{this.state.ariaLiveSelection}</span>
<span id="aria-context">&nbsp;{this.constructAriaLiveMessage()}</span>
</A11yText>
);
}
Expand Down

0 comments on commit 1f965ab

Please sign in to comment.