File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export function inject(
8686 const ariaAnnouncementSpan = document . createElement ( 'span' ) ;
8787 ariaAnnouncementSpan . id = 'blocklyAriaAnnounce' ;
8888 dom . addClass ( ariaAnnouncementSpan , 'hiddenForAria' ) ;
89- aria . setState ( ariaAnnouncementSpan , aria . State . LIVE , 'polite ' ) ;
89+ aria . setState ( ariaAnnouncementSpan , aria . State . LIVE , 'assertive ' ) ;
9090 subContainer . appendChild ( ariaAnnouncementSpan ) ;
9191
9292 return workspace ;
Original file line number Diff line number Diff line change @@ -202,20 +202,20 @@ export function getState(element: Element, stateName: State): string | null {
202202}
203203
204204/**
205- * Softly requests that the specified text be read to the user if a screen
205+ * Assertively requests that the specified text be read to the user if a screen
206206 * reader is currently active.
207207 *
208- * This relies on a centrally managed ARIA live region that should not interrupt
209- * existing announcements (that is, this is what's considered a polite
210- * announcement) .
208+ * This relies on a centrally managed ARIA live region that is hidden from the
209+ * visual DOM. This live region is assertive, meaning it will interrupt other
210+ * text being read .
211211 *
212212 * Callers should use this judiciously. It's often considered bad practice to
213- * over announce information that can be inferred from other sources on the
214- * page, so this ought to only be used when certain context cannot be easily
213+ * over- announce information that can be inferred from other sources on the
214+ * page, so this ought to be used only when certain context cannot be easily
215215 * determined (such as dynamic states that may not have perfect ARIA
216216 * representations or indications).
217217 *
218- * @param text The text to politely read to the user.
218+ * @param text The text to read to the user.
219219 */
220220export function announceDynamicAriaState ( text : string ) {
221221 const ariaAnnouncementSpan = document . getElementById ( 'blocklyAriaAnnounce' ) ;
You can’t perform that action at this time.
0 commit comments