Giter Club home page Giter Club logo

Comments (4)

jscholes avatar jscholes commented on June 23, 2024

@mcking65 Raising this as a discussion to revisit during a CG meeting.

from aria-at.

jscholes avatar jscholes commented on June 23, 2024

Summary from recent ARIA-AT Community Group meetings:

TL;DR

Neither the checkbox role, nor checked/not checked states, are sufficient to pass the current ARIA-AT tests. These two assertions will be marked as failing across the board, for all commands.

Background

Within Core Accessibility API Mappings 1.2:

  • role="switch" is mapped to IA2_ROLE_TOGGLE_BUTTON in IAccessible2, and Button/toggleswitch in UIA with the Toggle control pattern.
  • aria-checked, used to set the state of a switch, maps to:
    • IA2: STATE_SYSTEM_CHECKED for the "on" state, no exposed state when "off", and the attribute checkable:true in both states.
    • UIA: Toggle.ToggleState property set to On (1) or Off (0).

This results in a checkable toggle button for browsers exposing information via IA2, which is inconsistent from the pressed/not pressed semantics created via role="button" and aria-pressed. Due to the likely user confusion triggered by this inconsistency, NVDA has chosen to handle this "identity crisis" by:

  • using the IA2 XML-roles model to distinguish between standard toggle buttons and switches; and then
  • remapping the role of the internal NVDA object to checkbox, so that the role and states match.

The user-facing outcomes being that:

  • When a switch is encountered in a browser using IA2, NVDA reports it as a checkbox, with checked/not checked state.
  • When a switch is encountered in a browser or native context using UIA, NVDA reports it as a toggle button, with pressed/not pressed state. For example, this can be observed by enabling UIA for Microsoft Edge, using a modern Windows settings screen with switches on it, etc.

ARIA-AT Testing Results

  • None of our testers felt that the role output of "checkbox" was sufficient to match the assertion: "role 'switch' is conveyed".
  • One of our testers felt that the state output of "not checked" was sufficient to pass the assertion: "State 'off' is conveyed. Another test did not.

This leaves us with internal inconsistency between the role and state assertions, but also between testers for the state-related assertion specifically.

Next Steps

The Community Group has reached consensus on all results, for both role and state assertions, being aligned to the failure state. To expand on the reasoning behind this:

  • Toggle button and switch have some semantic equivalence, in that users can reasonably expect them to carry out some action when their state is changed. This semantic equivalence is not shared between checkbox and toggle button, or checkbox and switch, as a checkbox is generally used as a declarative control with the state being submitted later. Users should not be engineered to expect checkboxes to carry out an action when toggled, via NVDA incorrectly reporting switches as checkboxes.
  • NVDA users cannot legitimately determine when they are encountering a switch vs a checkbox, because the output is the same.
  • As such, NVDA could make the decision to detect the switch role via the XML-roles model, and either:
    • remap the checked/not checked states to pressed/not pressed, using the toggle button role; or
    • expose the switch role directly to the user, and remap checked/not checked to on/off in some way.
  • This would also help to redress the current imbalance/inconsistency between NVDA's IA2 and UIA handling of switches.

from aria-at.

jscholes avatar jscholes commented on June 23, 2024

@IsaDC Please change role and state assertions to failing where they are currently recorded as passing, and make sure all results indicate "incorrect output" where they currently have "no output" set.

from aria-at.

IsaDC avatar IsaDC commented on June 23, 2024

The Community Group has reached consensus on all results, for both role and state assertions, being aligned to the failure state. These changes have been made within the app.

from aria-at.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.