❌

Vue lecture

What State ARIA In?

Accessible Rich Internet Applications (ARIA) attributes play a vital role in communicating dynamic interface states to assistive technologies. However, attributes like aria-selected, aria-pressed, aria-current, and aria-checked are often confused because they all express some form of “state” or “selection.”

In this article, we’ll clarify what each of these attributes does, when to use them, and common mistakes developers make, helping ensure your ARIA implementation accurately reflects the user interface state and supports a predictable experience for assistive technology users.

aria-selected – Represents an Item’s Selection Within a Set

aria-selected is used for elements within a group of options where one or more items can be selected by the user. It tells assistive technology which item is currently chosen.

Typical use cases:

  • Tabs within a tablist (role="tab")
  • Listbox options (role="option")
  • Rows or cells in a grid (role="row" or role="gridcell")
  • Items within a hierarchical tree structure (role="treeitem")

Example:

<div role="tablist" aria-label="Sample Tabs">
  <button role="tab" aria-selected="true" aria-controls="panel1" id="tab1">Overview</button>
  <button role="tab" aria-selected="false" aria-controls="panel2" id="tab2">Details</button>
  <button role="tab" aria-selected="false" aria-controls="panel3" id="tab3">Settings</button> 
</div> 
<div id="panel1" role="tabpanel" aria-labelledby="tab1">Overview content...</div> 
<div id="panel2" role="tabpanel" aria-labelledby="tab2" hidden>Details content...</div> 
<div id="panel3" role="tabpanel" aria-labelledby="tab3" hidden>Settings content...</div> 

Key takeaway

Use aria-selected only when items belong to a selectable group. It does not toggle a control; it simply communicates which item is selected.

Developers sometimes confuse aria-selected with aria-current. While aria-selected indicates what a user has actively chosen within a group, aria-current indicates the user’s current context, such as the active page or the current step in a process.

Note: aria-selected applies only to roles that support selection — not arbitrary elements — and that using it on unsupported roles has no effect.

aria-pressed – Indicates a Toggle Button’s State

aria-pressed is applied to elements with role="button" that behave like switches or toggles. It describes whether the button is currently active (pressed) or inactive (not pressed).

Possible values:

  • true – Button is pressed/active
  • false – Button is not pressed/inactive
  • mixed – Button has a partially active state (e.g., “select all” that’s partially selected)

Example:

<button aria-pressed="true">Bold</button> <button aria-pressed="false">Italic</button> 

Key takeaway

Think of aria-pressed as representing an on/off or active/inactive state, not selection within a group.

Note: The aria-pressed="mixed" state has limited support in native elements and should be reserved for advanced composite toggle patterns, such as “Select All That Apply” interfaces, where the active state represents a partial selection across a group of interrelated controls.

aria-checked – Used for Checkable Widgets

aria-checked indicates whether a checkable element (such as a checkbox, radio button, menu item, or switch) is checked, unchecked, or mixed.

Possible values:

  • true – Checked
  • false – Unchecked
  • mixed – Indeterminate (e.g., “partially selected” parent node)

Example:

<div role="checkbox" aria-checked="true">Select All Notifications</div> 

Key takeaway

Use aria-checked only for widgets where users explicitly check or uncheck items. For elements with role="switch", only true or false are valid values; mixed should not be used. The aria-checked="mixed" state is invalid for the switch role in the current ARIA specification, and user agents must treat a mixed value as equivalent to false for this role.

aria-current – Identifies the Current Item or Location

aria-current marks an item that represents the current point of reference within a set, such as the active page, date, or step. It doesn’t indicate user action but rather context or position.

Common values:

  • page – Current page (recommended for navigation links)
  • step – Current step in a process
  • date – Current date
  • true – Generic “current” state (fallback when a more specific value doesn’t apply)
  • false – Explicitly marks an item as not current (optional; omitting aria-current usually has the same effect)

Example:

<nav aria-label="Main navigation"> 
  <a href="/home" aria-current="page">Home</a> <a href="/about">About</a> <a href="/contact">Contact</a> </nav>

Key takeaway

aria-current identifies where the user is, not what they have selected. It provides important contextual cues, particularly in navigation menus and step indicators.

Summary: Key Differences

Comparison of ARIA State Attributes

Attribute Purpose Common Roles Values Best Used For
aria-selected Marks an item as selected within a group tab, option, row, gridcell, treeitem true / false Highlighting selected item in a set (e.g., tabs, listbox, tree)
aria-pressed Indicates a toggle button’s active state button true / false / mixed* Toggle buttons (e.g., Bold/Italic). Mixed is for advanced composite toggles like “Select All That Apply”
aria-checked Shows checked/unchecked/mixed state checkbox, radio, menuitemcheckbox, switch true / false / mixed** Checkable controls. For role=”switch”, only true/false are valid; mixed is invalid
aria-current Identifies current location or context link, listitem, step, date page / step / date / true / false Current page, step, date, or contextual item.

* Limited support for mixed in native buttons; intended for complex composite toggle patterns.
** mixed is valid for checkboxes / radio / menuitemcheckbox, but not for switch; user agents treat mixed as false for switch.

Common Mistakes Developers Make

Even experienced developers sometimes mix up these attributes. Here are a few frequent issues:

Using aria-selected on navigation links

Developers often mark the current page link with aria-selected=”true”.
✅ Correct approach: Use aria-current="page" instead.

Using aria-checked for toggle buttons

Toggle buttons should use aria-pressed, not aria-checked.
✅ Example: <button aria-pressed="true">Mute</button>

Forgetting to update the ARIA state dynamically

When a button or checkbox changes visually, its ARIA state must also update programmatically to reflect that change.
✅ Keep ARIA states synchronized with UI behavior.

Applying multiple ARIA state attributes together

Adding both aria-selected and aria-pressed to the same element can confuse assistive technologies.
✅ Use only the one that matches the widget’s interaction pattern.

Overusing ARIA on native HTML controls

Native controls already communicate state through built-in accessibility APIs. Adding redundant ARIA attributes can cause duplicate or conflicting announcements.
✅ Prefer semantic HTML elements wherever possible.

Not removing unused ARIA attributes

When a widget changes state or is hidden/removed, leftover ARIA attributes can cause assistive technologies to announce outdated information.
✅ Tip: Always remove or update ARIA attributes when no longer relevant to prevent confusion and ensure accurate accessibility feedback.

Why This Matters

Correct ARIA state usage ensures that assistive technologies, such as screen readers, convey accurate and predictable information to users. Misusing these attributes can result in misleading or inconsistent feedback. for example, announcing a toggle button as a checkbox or marking a link as “selected” instead of “current.”

By aligning your implementation with the WAI-ARIA Authoring Practices 1.2, you ensure that your components behave consistently across devices and assistive technologies.

Best Practices

  • ✅ Use native HTML elements whenever possible; they include built-in ARIA semantics.
  • ✅ Dynamically update ARIA states as user interactions occur.
  • ⚠ Avoid redundant or conflicting ARIA attributes.
  • ⚠ Always test using screen readers (NVDA, JAWS, VoiceOver, TalkBack) to confirm correct behavior.
  • ⚙ Follow WAI-ARIA Authoring Practices 1.2 for implementation examples.

Conclusion

Each ARIA state attribute serves a distinct purpose:

  • Use aria-selected to indicate selected items within a group.
  • Use aria-pressed for toggle buttons representing on/off or active/inactive states.
  • Use aria-checked for checkable controls such as checkboxes or radios.
  • Use aria-current to identify the user’s current location or context.

Correct use of these attributes ensures assistive technologies present information accurately, fostering predictable and inclusive interactions.

By applying ARIA semantics carefully and only where necessary, developers can create interfaces that are not just compliant but truly accessible for all users.

Resources

  1. MDN – ARIA: aria-selected attribute
  2. MDN – ARIA: aria-pressed attribute
  3. MDN – ARIA: aria-current attribute
  4. MDN – ARIA: aria-checked attribute
  5. Accessible Rich Internet Applications (WAI-ARIA) 1.2
  6. ARIA Authoring Practices Guide (APG)
Like to be notified about more articles like this? Subscribe to the Knowledge Center Newsletter. It not only gives you summaries and links to our technical blog posts but also TPGi webinars, podcasts, and business blog posts – as well as accessibility and web tech conferences and other events, and a reading list of other relevant articles. You get one email a month, it’s free, requires just your email address, and we promise we won’t share that with anyone. Check the archive.

The post What State ARIA In? appeared first on TPGi — a Vispero company.

  •  

Understanding the Removal of 4.1.1 Parsing in WCAG 2.2

For anyone developing accessible digital content, keeping up with changes to the Web Content Accessibility Guidelines (WCAG) is essential. One of the more notable updates in WCAG 2.2 is the removal of Success Criterion (SC) 4.1.1: Parsing.

This article explains what SC 4.1.1 covered, why it was removed, how it affects accessibility in practice, and which criteria now address issues once covered by parsing.

Why Does It Matter?

Parsing errors, such as invalid or poorly structured markup, were once a significant concern because they could affect how assistive technologies interpreted a webpage. Earlier, assistive technologies sometimes performed their own parsing, which made them more vulnerable to broken markup. Since WCAG 2.0 was published, however, both web specifications (such as HTML) and browsers have greatly improved in handling these errors.

Today, assistive technologies rely on the browser’s interpretation of markup rather than doing their own parsing. Because of this, most parsing errors no longer create real barriers for users, which is why SC 4.1.1 was made obsolete in WCAG 2.2.

SC 4.1.1 was originally included to encourage valid, well-structured markup. Its removal does not mean that writing clean code is unimportant; rather, it acknowledges that this requirement is no longer necessary because modern browsers and assistive technologies handle parsing errors far more reliably.

What Was 4.1.1 Parsing?

Under WCAG 2.1, SC 4.1.1 required:

  • HTML, XML, or other markup languages to follow syntax rules.
  • Proper nesting and closing of elements.
  • Unique ID attributes for all elements.
  • Avoidance of stray or unclosed tags that could disrupt the document structure.

The aim was to ensure that assistive technologies and browsers could interpret content reliably, improving both accessibility and interoperability.

What Changed in WCAG 2.2?

WCAG 2.2 removed SC 4.1.1 for several reasons:

  1. Limited Direct Impact

    Many parsing issues no longer create real barriers for assistive technology users.

    Example:

    <div>
      <p>Hello, world
    <--missing </div> and </p> -->

    This markup triggers a validator error, but browsers typically auto-correct it, and therefore assistive technologies will interpret it correctly.

  2. Relevance Under Other Criteria

    Real-world issues tied to invalid markup are better addressed under other criteria:

    • Duplicate ID values → SC 4.1.2: Name, Role, Value
    • Incorrect nesting of interactive elements → SC 2.4.3: Focus Order, SC 4.1.2: Name, Role, Value
    • Stray or unclosed tags → SC 1.3.1: Info and Relationships, SC 4.1.2: Name, Role, Value
  3. Technology Evolution

    When SC 4.1.1 was introduced, browsers and assistive tech often broke on stray tags or invalid nesting. Today, both are far better at handling minor syntax errors, so these issues rarely block access.

  4. Focus and Simplicity

    Removing SC 4.1.1 helps WCAG focus on accessibility issues that affect users directly, instead of minor coding mistakes that don’t cause real problems.

What Are the Risks Now?

Although most parsing errors no longer block accessibility, some mistakes can still cause real problems when they affect element relationships, accessible names, roles, or focus order. These issues are now handled under other Success Criteria rather than SC 4.1.1.

Duplicate ID values

Every id attribute in a document is required to be unique. Problems caused by duplicates depend on context:

  • A <label for="id"> may associate with the wrong input, causing screen readers to announce incorrect or confusing information.
  • ARIA references such as aria-labelledby, aria-controls, or aria-describedby may fail, breaking the link between elements and leaving users without instructions.
  • Links pointing to an id may direct users to the wrong location or confuse screen reader navigation.

Relevant SCs: 1.3.1 Info and Relationships, 1.3.2 Meaningful Sequence, 2.4.3 Focus Order, 2.4.4 Link Purpose, 4.1.2 Name, Role, Value, 2.5.3 Label in Name

Improper nesting of interactive elements

Interactive elements (like <a>, <button>, <input>, <select>) should not be nested inside one another.

Example:

<a href="#"&gt:
  <button>Click Me</button>
</a&gt>

Risks include:

  • Confusing the accessibility tree, making it unclear which element should receive focus.
  • Inconsistent behavior across browsers and assistive technologies.
  • Keyboard navigation issues, such as incorrect focus order or unexpected activation.

Relevant SCs: 2.4.3: Focus Order, 4.1.2: Name, Role, Value

Stray tags or unclosed elements

Errors like unclosed elements or misplaced tags generally do not block access today because modern browsers can handle them. However, issues arise when they disrupt:

  • Relationships between labels, controls, and interactive elements.
  • Heading order, table structures, or list order.
  • ARIA widget structure or scripted behavior dependent on the DOM.

Example:

<ul>
  <li>First item
  <li>Second item
</div> <!-- Stray closing div -->

Risks include:

  • Screen readers may skip content or read it in the wrong order.
  • CSS and JavaScript that rely on a predictable DOM structure may break.
  • Layout or structure may render inconsistently across browsers, making navigation harder for users with disabilities.

Relevant SCs: 1.3.1: Info and Relationships, 4.1.2: Name, Role, Value

Labels not programmatically associated

Example:

<label>First Name</label>
<input type="text" id="firstName">

Since there’s no for linking the label to the input, screen readers may not announce it when focus enters the field, confusing users relying on assistive technology or voice input.

Relevant SCs: 1.3.1: Info and Relationships, 4.1.2: Name, Role, Value

Best Practices Going Forward

To ensure accessible experiences under WCAG 2.2:

  • Write clean, semantic HTML – While no longer enforced by 4.1.1, well-formed markup improves consistency across platforms.
  • Match visible labels with accessible names – Essential for screen reader and voice control users.
  • Test keyboard navigation – Verify logical focus order, operable controls, and no traps.
  • Use semantic structure – Apply headings, ARIA landmarks, and labels to convey relationships clearly.

Conclusion

The removal of SC 4.1.1 from WCAG 2.2 marks a shift from syntax enforcement to user-centered accessibility. Clean code remains a best practice, but WCAG now emphasizes whether users with disabilities can access, perceive, and operate digital content.

Developers should continue to:

  • Write semantic, valid code.
  • Provide proper labeling.
  • Ensure robust keyboard support.
  • Maintain logical content structures.

By prioritizing real user experience over strict validator compliance, we can build more inclusive and usable digital environments.

References

Like to be notified about more articles like this? Subscribe to the Knowledge Center Newsletter. It not only gives you summaries and links to our technical blog posts but also TPGi webinars, podcasts, and business blog posts – as well as accessibility and web tech conferences and other events, and a reading list of other relevant articles. You get one email a month, it’s free, requires just your email address, and we promise we won’t share that with anyone. Check the archive.

The post Understanding the Removal of 4.1.1 Parsing in WCAG 2.2 appeared first on TPGi — a Vispero company.

  •  
❌