Wednesday, June 8, 2022
HomeWordPress DevelopmentA11Y 101: WAI-ARIA Properties - DEV Neighborhood

A11Y 101: WAI-ARIA Properties – DEV Neighborhood


Within the earlier article, we had a take a look at what the WAI-ARIA is and which world components it comes with.

I will go a bit deeper into WAI-ARIA properties on this particular article.

As a reminder, properties give further which means to an attribute, as to states that describe a situation.



WAI-ARIA properties checklist

  • aria-autocomplete: Described if and the way a to autocomplete is offered, values are: none, inline, checklist, and each.
  • aria-label: Can be utilized to label a component, for instance, an SVG button with no textual content.
  • aria-labelledby: Reference the component that has the label textual content.
  • aria-level: Outline the extent of a component that can be utilized for headings, though we must always choose to make use of h1 and many others. for this. Moreover, it may be used on tree grids.
  • aria-orientation: Describe the orientation of the component values are: horizontal, vertical, or undefined.
  • aria-placeholder: Describe a placeholder for a component that does not help the native placeholder attribute.
  • aria-sort: Describe the sorting order for a desk or checklist. Values are: ascending, descending, none, or different.
  • aria-valuemax: Set the max worth customers can use.
  • aria-valuemin: Set the minimal worth customers can use.
  • aria-valuenow: Set the present numeric worth.
  • aria-valuetext: Outline a textual content worth as a substitute of aria-valuenow.
  • aria-live: Describe a reside aria. Extra info on that is separate.
  • aria-relevant: Used inside a reside aria to explain what sort of notification will set off, values are: additions, all, removals, textual content.
  • aria-dropeffect: Describe the kind of drop impact, values are: copy, execute, hyperlink, transfer, none, or popup.
  • aria-activedescendant: Describe the present energetic focus for a composite widget.
  • aria-colcount: Describe the full depend of columns in a desk, grid, or tree grid.
  • aria-rowcount: Describe the full depend of rows in desk, grid, or tree grids.
  • aria-colindex: Describe an components column index or place.
  • aria-rowindex: Describe the weather’ row index.
  • aria-colspan: Describe the variety of columns a component spans.
  • aria-rowspan: Describe the variety of rows a component spans.
  • aria-controls: Describe the component(s) which are managed by the present component.
  • aria-describedby: Establish the component(s) that describe the thing.
  • aria-description: Attribute that defines an outline for the component. (Much like label, however longer textual content)
  • aria-details: Establish the component that describes extra info for this object.
  • aria-errormessage: Establish the component that describes the error message.
  • aria-flowto: Describe the pure subsequent component.
  • aria-owns: Set all components owned by this component
  • aria-posinset: The present place of this component inside a set.
  • aria-setsize: Describe the full variety of objects in a set.
  • aria-current: Describe the present component in a set of associated objects, for instance in a breadcrumb checklist.
  • aria-keyshortcuts: Describe shortcuts for a selected component.
  • aria-roledescription: Describe a extra readable function illustration for a component.

With all these properties, it is good to notice they need to at all times solely suffice as a final resort.
Loads of these properties can be found in semantic HTML options.

For instance, valuemin, valuemax and many others., are additionally out there on enter components.

<enter min="0" max="255" present="100" />
Enter fullscreen mode

Exit fullscreen mode

The bottom line is solely to make use of the ARIA properties whenever you choose to go off semantic for a specific purpose.



Thanks for studying, and let’s join!

Thanks for studying my weblog. Be at liberty to subscribe to my electronic mail e-newsletter and join on Fb or Twitter



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments