Cookie Consent by Free Privacy Policy Generator Aktuallisiere deine Cookie Einstellungen ๐Ÿ“Œ ARIA attributes: The forgotten ones of accessibility


๐Ÿ“š ARIA attributes: The forgotten ones of accessibility


๐Ÿ’ก Newskategorie: Programmierung
๐Ÿ”— Quelle: dev.to

ARIA attributes?

Accessible Rich Internet Applications (ARIA) attributes might not be on every developer's radar, yet they play a pivotal role in fostering accessibility within web products. By augmenting HTML elements, ARIA attributes convey vital information to assistive technologies, enriching the accessibility tree, by modifying or providing additional details to incomplete code.

ARIA attributes are imperceptible to most users, as they neither alter functionality nor influence visual appearance; their impact is predominantly felt by assistive technology users.

When to use ARIA

ARIA is not a panacea for correcting faulty code nor does it automatically enhance a website's accessibility. Consider utilizing ARIA under the following circumstances:

  • When a specific feature lacks HTML support.
  • When HTML features are present but lack proper accessibility support.
  • When styling requirements prevent the use of a native element.

ARIA features

The main features of ARIA are:

  • state: Allows elements to change their state. For instance, when using a non-native HTML element as a checkbox, the aria-checked attribute informs assistive technologies about the checkbox's status.

<div aria-checked="true" role="checkbox" >Checkbox input </div>

  • role: Expresses the purpose or nature of an element. For example, defining a button using the role attribute.

<div role="button">Close Modal</div>

  • properties: Define the relationship or characteristics between elements.
<button aria-describedby="close-description">Close modal</button>
<p id="close-description">This button will close a modal</p>

Categorization of Roles

ARIA roles are categorized into Abstract Roles, Widget Roles, Document Structure Roles, Landmark Roles, Live Region Roles, and Window Roles. Each serves a distinct purpose in organizing and describing elements within a web page.

  • Abstract Roles: Abstract Roles are intended solely for browser use in organizing a document. Developers should refrain from utilizing them to ensure optimal performance. Avoid incorporating these rolesโ€”command, composite, input, landmark, range, roletype, section, sectionhead, select, structure, widget, and windowโ€”into your projects.
  • Widget Roles: These roles define common interactive patterns, providing a standardized approach for enhancing user interactivity.
  • Document Structure Roles: The various Document Structure Roles serve the purpose of conveying information about the structure within a section of a document.
  • Landmark Roles: Landmark roles indicate the structure and organization of a web page.
  • Live Region Roles: They define elements whose content will dynamically change
  • Window Roles: Window Roles specify roles for sub-windows within the main window, offering a structured hierarchy in web application interfaces.

States and properties

There are 38 properties in ARIA for states and properties and they fall into 4 categories according to W3C:

  • Drag-and-Drop Attributes: These attributes give information about drag-and-drop elements.
  • Relationship Attributes: They specify relationships between elements, enhancing the contextual understanding of content.
  • Widget Attributes: They define details about user input elements
  • Live Region Attributes: Live Region Attributes signal elements where content changes dynamically, even when those elements may not currently have focus. These attributes play a crucial role in creating dynamic and responsive content areas.

Tips for ARIA

Don't use ARIA

Follow ARIA's principle: the less you use it, the better. Prioritize solving accessibility challenges through HTML and UI adjustments before resorting to ARIA.

Use Semantic HTML

Prefer using HTML tags with implicit meaning or roles over ARIA attributes whenever possible. Semantic HTML tags, such as <button> or <main>, inherently provide accessibility benefits.

<button>Use this</button>
<div role="button">Not this</div>

<main>Use this</main>
<div role="main">Not this</div>

Besides, HTML5 tags already have landmark roles so it's unnecessary to add them and they are redundant.

Elements should be focusable

Make sure interactive ARIA controls are keyboard-accessible. If an element lacks native keyboard focus, include it in the logical tab order using tabindex="0".

<p tabindex=โ€œ0โ€>I recieve focus!</p>

Don't hide elements

Focusable elements shouldn't be hidden, so avoid using aria-hidden="true" or role="presentation". If a user tries to navigate through the keyboard, that person may end up focusing on nothing and it can be confusing.

Check ARIA syntax

Many common mistakes with ARIA could have been solved just by checking the syntax. For example: roles should be written in lowercase. Some browsers might be able to interpret the roles even in uppercase, however, but other browsers might not.

Don't overwrite semantics

Use ARIA only when HTML semantics prove inadequate or unavailable. Developers should avoid overwriting HTML native semantics. For example: If you want to build a heading tag, the <h2> itself has its own semantic meaning. However, a <div> can receive this role.

<div role=tab><h2>Do this</h2></div>
<h2 role=tab>Don't do this</h2>
...



๐Ÿ“Œ ARIA attributes: The forgotten ones of accessibility


๐Ÿ“ˆ 75.94 Punkte

๐Ÿ“Œ Saving variation attributes on new products and with attributes containing slashes could lead to XSS


๐Ÿ“ˆ 32.66 Punkte

๐Ÿ“Œ Web Accessibility โ€“ Common ARIA Mistakes to Avoid


๐Ÿ“ˆ 29.61 Punkte

๐Ÿ“Œ [Accessibility] Points to Consider When Adding aria-label to Icon Font Elements


๐Ÿ“ˆ 29.61 Punkte

๐Ÿ“Œ Migrating from Radix to React Aria: Enhancing Accessibility and UX at Argos


๐Ÿ“ˆ 29.61 Punkte

๐Ÿ“Œ Creating Web Accessibility: HTML Attributes


๐Ÿ“ˆ 28.58 Punkte

๐Ÿ“Œ [accessibility] GTK Roadmap and accessibility


๐Ÿ“ˆ 24.49 Punkte

๐Ÿ“Œ Doubling down on accessibility: Microsoftโ€™s next steps to expand accessibility in technology, the workforce and workplace


๐Ÿ“ˆ 24.49 Punkte

๐Ÿ“Œ Accessibility testing - Accessibility on Android


๐Ÿ“ˆ 24.49 Punkte

๐Ÿ“Œ CVE-2022-42960 | EqualWeb Accessibility Widget up to 4.0.1 Message Event accessibility.js cross site scripting


๐Ÿ“ˆ 24.49 Punkte

๐Ÿ“Œ Doubling down on accessibility: Microsoftโ€™s next steps to expand accessibility in technology, the workforce and workplace


๐Ÿ“ˆ 24.49 Punkte

๐Ÿ“Œ Global Accessibility Awareness Day โ€“ Accessibility at the heart of innovation ย 


๐Ÿ“ˆ 24.49 Punkte

๐Ÿ“Œ accessibility tips from an accessibility engineer


๐Ÿ“ˆ 24.49 Punkte

๐Ÿ“Œ Fitbit-Neuheiten: Fitness-Smartwatch Ionic & Waage Aria 2


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Fitbit Aria 2 im Test: WLAN-Waage mit Fettanalyse


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ aria 0.99-6 Help page directory traversal


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Open-Xchange OX AppSuite up to 7.8.0-rev26 Portal aria-label cross site scripting


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Fitbit Aria Air: Gรผnstigere Bluetooth-Waage ergรคnzt Kรถrperdaten


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ The Fitbit Aria 2 smart scale just hit its best price yet


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Enjoy crisp audio and noise cancellation with these $99 xFyro ARIA earbuds


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Fitbit prรคsentiert mit der Aria Air eine smart Waage zum kleinen Preis


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Mozilla Firefox up to 54 ARIA Attribute memory corruption


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Mozilla Firefox up to 55 ARIA Element Use-After-Free memory corruption


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ New โ€˜Aria-bodyโ€™ backdoor gets advanced hackers โ€Œback in the spy game


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Mozilla Firefox bis 48 Aria-Owns Attribute Handler ProcessInvalidationList Pufferรผberlauf


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Fitbit: Versa 2 und smarte Waage Aria Air offiziell vorgestellt


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Naikonโ€™s Aria


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Projekt Aria: Facebook sammelt Daten fรผr die AR-Zukunft


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Projekt Aria: Facebook sammelt Daten fรผr die AR-Zukunft


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Avantree Aria Me: Bluetooth-Kopfhรถrer mit individueller Klanganpassung und Mikrofon


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Quantencomputer IonQ Aria vorgestellt


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ CVE-2016-5276 | Mozilla Firefox up to 48 Aria-Owns Attribute ProcessInvalidationList use after free (MFSA2016-85 / Nessus ID 94043)


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Open-Xchange OX AppSuite bis 7.8.0-rev26 Portal aria-label Cross Site Scripting


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Project Aria: Get Ready for Ray-Ban Branded AR Glasses From Facebook


๐Ÿ“ˆ 17.37 Punkte

๐Ÿ“Œ Projekt Aria: Facebook experimentiert mit AR-Brille fรผr zukรผnftige Technologien


๐Ÿ“ˆ 17.37 Punkte











matomo