Giter Site home page Giter Site logo

xi / w3c-alternative-text-computation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from whatsock/w3c-alternative-text-computation

0.0 3.0 0.0 360 KB

A study of browser and Assistive Technology support for the W3C Alternative Text Computation.

License: MIT License

w3c-alternative-text-computation's Introduction

w3c-alternative-text-computation

A study of browser and Assistive Technology support for the W3C Alternative Text Computation.

To ensure interoperability, the W3C Alternative Text Computation should be supported in all browsers equally. So I built 5 tests to see how well this is implemented; by using the same convoluted markup structure for each that combines many various aspects of labelling, including programmatically hidden content and nested markup structures. If equally supported, all browsers would reflect the same strings as shown below for the Name and Description calculation.

Visual ARIA is included within each test page to validate a shared Name and Description according to the Alternative Text Computation, as documented at http://www.w3.org/TR/accname-aam-1.1/#mapping_additional_nd_te (Which is exposed when mousing over the ARIA Link or form edit field on the test pages after loading Visual ARIA)

Currently, accurate recursion within browsers is inconsistently and unreliably supported, and no Assistive Technologies match any of these naming algorithms.

The following test pages demonstrate this, which can be verified using Accessibility Tree examination utilities as documented at http://whatsock.com/training/#hd2

Standard use of role="link" with nested content structures.

https://accdc.github.io/w3c-alternative-text-computation/Name%20and%20Description%20Tests/focusable%20role=link.html

The Accessibility Tree should match: Name: "My name is Garaventa the weird. (QED) Where are my marbles?" Description: ""

Browser Test Results:

  • Win7 IE11: Name: "Hello, My name is Zambino the weird. (QED) and don't you forget it. Where in the world are my marbles?" Description: ""
  • Win7 Firefox: Name: "Hello, My name is Eli the weird. ( QED )" Description: ""
  • (MATCHES) Win7 Chrome: Name: "My name is Garaventa the weird. (QED) Where are my marbles?" Description: ""
  • iOS Safari: Name: "My name is Zambino the weird. (QED) Where are my marbles?" Description: ""

Standard form field with aria-labelledby to recursively process embedded markup.

https://accdc.github.io/w3c-alternative-text-computation/Name%20and%20Description%20Tests/form%20field%20with%20aria-labelledby.html

The Accessibility Tree should match: Name: "My name is Garaventa the weird. (QED) Where are my marbles?" Description: ""

Browser Test Results:

  • Win7 IE11: Name: "" Description: ""
  • Win7 Firefox: Name: "Hello, My name is Eli the weird. ( QED )" Description: ""
  • (MATCHES) Win7 Chrome: Name: "My name is Garaventa the weird. (QED) Where are my marbles?" Description: ""
  • iOS Safari: Name: "My name is Eli the weird. (QED) Where in are my marbles?" Description: ""

Standard form field that uses an HTML label element with matching 'for' and 'id' attributes.

https://accdc.github.io/w3c-alternative-text-computation/Name%20and%20Description%20Tests/form%20field%20with%20label%20element.html

The Accessibility Tree should match: Name: "My name is Garaventa the weird. (QED) Where are my marbles?" Description: ""

Browser Test Results:

  • Win7 IE11: Name: "Hello, My name is Zambino the weird. (QED) and don't you forget it. Where in the world are my marbles?" Description: ""
  • Win7 Firefox: Name: "Hello, My name is Eli the weird. (QED)" Description: ""
  • (MATCHES) Win7 Chrome: Name: "My name is Garaventa the weird. (QED) Where are my marbles?" Description: ""
  • iOS Safari: Name: "My name is Zambino the weird. (QED) Where are my marbles?" Description: ""

Standard form field that uses aria-label to set the Name and aria-describedby to set the Description.

https://accdc.github.io/w3c-alternative-text-computation/Name%20and%20Description%20Tests/form%20field%20with%20aria-describedby.html

The Accessibility Tree should match: Name: "Important stuff" Description: "My name is Garaventa the weird. (QED) Where are my marbles?"

Browser Test Results:

  • Win7 IE11: Name: "Important stuff" Description: ""
  • Win7 Firefox: Name: "Important stuff" Description: "Hello, My name is Eli the weird. ( QED )"
  • (MATCHES) Win7 Chrome: Name: "Important stuff" Description: "My name is Garaventa the weird. (QED) Where are my marbles?"
  • iOS Safari: Name: "Important stuff" Description: "My name is Eli the weird. (QED) Where in are my marbles?"

Standard form field that uses aria-labelledby to set the Name and aria-describedby to set the Description including hidden sections that surround the referenced elements.

https://accdc.github.io/w3c-alternative-text-computation/Name%20and%20Description%20Tests/form%20field%20with%20aria-describedby%20+%20hidden.html

The Accessibility Tree should match: Name: "Important stuff" Description: "My name is Garaventa the weird. (QED) Where are my marbles?"

Browser Test Results:

  • Win7 IE11: Name: "Important stuff" Description: ""
  • Win7 Firefox: Name: "Important stuff" Description: "Hello, My name is Zambino the weird. (QED) and don't you forget it. Where in the world are my marbles?"
  • Win7 Chrome: Name: "" Description: "My name is Garaventa the weird. (QED) Where are my marbles?"
  • iOS Safari: Name: "Important stuff" Description: "Hello, My name is Zambino the weird. (QED) and don't you forget it. Where in the world are my marbles?"

Conclusion

Whenever external containers are referenced via aria-labelledby or aria-describedby or the HTML label element using matching 'for' and 'id' attributes, the recursive Alternative Text Computation should process the same subtrees even when aria-labelledby and aria-describedby referenced parent containers are hidden using CSS. When comparing these in the Accessibility Tree though, even within the same browsers, these algorithms don't match between the most common browsers.

Additionally, screen readers such as JAWS and NVDA don't come anywhere near conveying the same algorithm, often varying widely across differing browsers despite what is conveyed within the Accessibility Tree.

In the interest of ensuring future interoperability for web technologies across all devices, it would be beneficial for all browsers to equally support the same Alternative Text Computation algorithm, and have the same algorithm supported in ATs like screen readers as well, for all of the previously mentioned interactive elements and ARIA roles. If assistive technologies utilize the accessibility tree to convey this information, then these browser improvements will automatically increase accessibility within these assistive technologies.

Otherwise, it will be impossible to create complex dynamic constructs that are consistently and reliably labelled for Assistive Technology users in the future.

w3c-alternative-text-computation's People

Contributors

accdc avatar

Watchers

Tobias Bengfort avatar James Cloos avatar  avatar

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.