zl程序教程

您现在的位置是:首页 >  其它

当前栏目

[ARIA] Define a Live Region to Ensure Dynamic Changes are Announced by Assistive Technologies

to by are Dynamic Live define region changes
2023-09-14 09:00:47 时间

When dynamic changes occur to content on a page they are usually visually apparent to users who can see the page but may not be made apparent to users of assistive technologies. ARIA live regions provide a way to make those dynamic content changes able to be announced by assistive technologies.

ARIA attributes

  • aria-live: the priority with which updates are read
  • aria-atomic: whether the screen reader should always present the live region as a whole, even if only part of the region changes
  • aria-relevant - takes a list of what type of changes should be announced

Resources

<div
  id={errorId}
  className="invalid-feedback"
  aria-live="polite"
  aria-atomic="true"
  aria-relevant="additions text removals"
>
  {!isValid ? errorText : ''}
</div>