New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 3 users
Status: Fixed
Owner: ----
Closed: Jan 2015
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug
Team-Accessibility



Sign in to add a comment
HTML controls do not expose invalid state in acc layer
Project Member Reported by faulkner...@gmail.com, Jun 15 2014 Back to list
Version: <35>
OS: <windows 8.1>

HTML5 requires that an element with a required attribute 
that is a candidate for constraint validation but does not satisfy its constraints is exposed in browsers with the platform dependent equivalent of aria-invalid=true. This maps to  IA2_STATE_INVALID_ENTRY in IAccessible2. Currently the input element with a required attribute does not expose this state or equivalent (unlike FF and IE)

references
HTML5 WAI-ARIA section http://www.w3.org/html/wg/drafts/html/master/dom.html#sec-strong-native-semantics
WAI-ARIA implementation guide property mapping table: http://www.w3.org/TR/wai-aria-implementation/#mapping_state-property_table
HTML5 required attribute definition http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-input-required

What is the expected behavior?  

Element with a required attribute and is Suffering from being missing has an IAccessible2 state of  IA2_STATE_INVALID_ENTRY

"Suffering from being missing"
http://www.w3.org/html/wg/drafts/html/master/forms.html#suffering-from-being-missing

Steps to reproduce

open https://dl.dropboxusercontent.com/u/377471/browser-tests/required-elements.html check the IA2 state of the elements using an object inspection tool (aViewer for example: http://www.paciellogroup.com/resources/aviewer)  
 
Cc: shreera...@samsung.com dmazz...@chromium.org
@Steve:
Spec http://w3c.github.io/aria/aria/aria.html#aria-invalid
"When the user attempts to submit data involving a field for which aria-required is true, authors may use the aria-invalid attribute to signal there is an error. However, if the user has not attempted to submit the form, authors should not set the aria-invalid attribute on required widgets simply because the user has not yet entered data."

As I am able to refer fromt the spec that setting aria-invalid in this scenario depends on the Author... not upon the User Agent.
Hi @Shreeram,

the ARIA requirements and the HTML implementation requirements are separate things.
by default <input type=text required> has both an invalid and required state, until the the required data has been provided.

unlike 
<input type=text aria-required=true>
or
<div role=textbox aria-required=true>  which only has a required state and will remain in the required state until aria-required=false is set.
Project Member Comment 4 by bugdroid1@chromium.org, Jan 13 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4752162c54a5d5d36bbbb290e127a6b29c2a6e87

commit 4752162c54a5d5d36bbbb290e127a6b29c2a6e87
Author: nektar <nektar@chromium.org>
Date: Tue Jan 13 17:50:25 2015

Exposed the invalid state of form controls to the accessibility APIs.

BUG= 384834 
R=dmazzoni

Review URL: https://codereview.chromium.org/790003003

Cr-Commit-Position: refs/heads/master@{#311287}

[modify] http://crrev.com/4752162c54a5d5d36bbbb290e127a6b29c2a6e87/content/browser/accessibility/browser_accessibility_cocoa.mm
[modify] http://crrev.com/4752162c54a5d5d36bbbb290e127a6b29c2a6e87/content/browser/accessibility/browser_accessibility_win.cc
[modify] http://crrev.com/4752162c54a5d5d36bbbb290e127a6b29c2a6e87/content/renderer/accessibility/blink_ax_enum_conversion.cc
[modify] http://crrev.com/4752162c54a5d5d36bbbb290e127a6b29c2a6e87/content/renderer/accessibility/blink_ax_enum_conversion.h
[modify] http://crrev.com/4752162c54a5d5d36bbbb290e127a6b29c2a6e87/content/renderer/accessibility/blink_ax_tree_source.cc
[modify] http://crrev.com/4752162c54a5d5d36bbbb290e127a6b29c2a6e87/content/test/data/accessibility/aria/aria-invalid-expected-android.txt
[modify] http://crrev.com/4752162c54a5d5d36bbbb290e127a6b29c2a6e87/content/test/data/accessibility/aria/aria-invalid-expected-mac.txt
[modify] http://crrev.com/4752162c54a5d5d36bbbb290e127a6b29c2a6e87/content/test/data/accessibility/aria/aria-invalid-expected-win.txt
[modify] http://crrev.com/4752162c54a5d5d36bbbb290e127a6b29c2a6e87/content/test/data/accessibility/aria/aria-invalid.html
[modify] http://crrev.com/4752162c54a5d5d36bbbb290e127a6b29c2a6e87/content/test/data/accessibility/html/readme.txt
[modify] http://crrev.com/4752162c54a5d5d36bbbb290e127a6b29c2a6e87/ui/accessibility/ax_enums.idl
[modify] http://crrev.com/4752162c54a5d5d36bbbb290e127a6b29c2a6e87/ui/accessibility/ax_node_data.cc

Status: Fixed
Sign in to add a comment