Adding an aria-live="polite"
attribute to the wrapper around the changing content should notify assistive technology whenever its contents has been changed.
For example adding that attribute to the parent surrounding of the <Switch>
component will notify VoiceOver whenever any components is rendered by a <Route>
component after navigation.
const Main = () => {
<main aria-live="polite">
<Switch>
<Route exact path='/' component={Home}/>
<Route path='/about' component={About}/>
<Route path='/contact' component={Contact}/>
</Switch>
</main>
};
ARIA live regions - MDN
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…