This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23377 - ARIA: Strong Native Semantics table should define implicit non-required state on form elements (Currently defines required state, but not the implicit inverse)
Summary: ARIA: Strong Native Semantics table should define implicit non-required state...
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: steve faulkner
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords: CR
: 23376 (view as bug list)
Depends on: 23376
Blocks: 23378
  Show dependency treegraph
 
Reported: 2013-09-27 07:37 UTC by steve faulkner
Modified: 2014-05-08 21:40 UTC (History)
5 users (show)

See Also:


Attachments

Description steve faulkner 2013-09-27 07:37:05 UTC
+++ This bug was initially created as a clone of Bug #23376 +++

@required is a Boolean attribute in HTML.
@aria-required is a "true/false" (boolean) attribute in ARIA.

The spec currently defines in the Strong Native Semantics table that:

input element that is required = The aria-required state set to "true"…
select element with a required attribute = The aria-required state set to "true"…
textarea element with a required attribute = The aria-required state set to "true"…

but since the HTML host language attribute is Boolean, the same elements *without* the required attribute defined are implicitly *not* required. Therefore, the strong native semantics table should also include:

input element that is not required = The aria-required state set to "false"…
select element without a required attribute = The aria-required state set to "false"…
textarea element without a required attribute = The aria-required state set to "false"…

Otherwise, the spec is implying that "HTML true is in conflict with ARIA false" but "HTML false is not in conflict with ARIA true", and defining one-way conflict resolution does not make sense for a Boolean state like this.


Likewise:
Element that is disabled = The aria-disabled state set to "true"

So the table should also include:
Element that is not disabled = The aria-disabled state set to "false"
Comment 1 github bugzilla bot 2013-09-27 08:55:54 UTC
Commit pushed to master at https://github.com/w3c/html

https://github.com/w3c/html/commit/ab7e3f79a055b6490f52b316283efec9f2d90440
explicitly allow aria-required

define an input or textarea without a required attribute is allowed to
have a aria-required attribute="true|false"
see bug 23377
Comment 2 steve faulkner 2013-09-27 09:07:03 UTC
(In reply to steve faulkner from comment #0)
> +++ This bug was initially created as a clone of Bug #23376 +++
> 
> @required is a Boolean attribute in HTML.
> @aria-required is a "true/false" (boolean) attribute in ARIA.
> 
> The spec currently defines in the Strong Native Semantics table that:
> 
> input element that is required = The aria-required state set to "true"…
> select element with a required attribute = The aria-required state set to
> "true"…
> textarea element with a required attribute = The aria-required state set to
> "true"…
> 
> but since the HTML host language attribute is Boolean, the same elements
> *without* the required attribute defined are implicitly *not* required.
> Therefore, the strong native semantics table should also include:
> 
> input element that is not required = The aria-required state set to "false"…
> select element without a required attribute = The aria-required state set to
> "false"…
> textarea element without a required attribute = The aria-required state set
> to "false"…
> 
> Otherwise, the spec is implying that "HTML true is in conflict with ARIA
> false" but "HTML false is not in conflict with ARIA true", and defining
> one-way conflict resolution does not make sense for a Boolean state like
> this.
> 
> 
> Likewise:
> Element that is disabled = The aria-disabled state set to "true"
> 
> So the table should also include:
> Element that is not disabled = The aria-disabled state set to "false"

Hi james, 

I think there are legitimate use cases for allowing aria-required on elements without the required attribute.

It is common practice to have a a control that is marked as required in text for example using an asterisk:

<label>name * <input></label>

It is not a requirement in HTML5 that this pattern must use the required attribute to mark the control as required, and there are reasons why an author may not want to use the required attribute such as they do not want the associated UI and behaviour that is implemented by some user agents for the required attribute. Thus in the example above providing the author with the means to convey the required state to acc APIs via aria-required will improve the accessibility of the pattern.

I have defined the use of aria-required on controls without the required attribute as allowed in the spec (see commit below)
Comment 3 github bugzilla bot 2013-09-27 09:31:20 UTC
Commit pushed to master at https://github.com/w3c/html

https://github.com/w3c/html/commit/7164e921de9185e122778a3cd22cb7e81fc171b5
added select as allowed to have aria-required

missed it before
see bug 23377
Comment 4 James Craig 2013-09-27 17:26:02 UTC
(In reply to steve faulkner from comment #2)

> I think there are legitimate use cases for allowing aria-required on
> elements without the required attribute.
> 
> It is common practice to have a a control that is marked as required in text
> for example using an asterisk:
> 
> <label>name * <input></label>
> 
> It is not a requirement in HTML5 that this pattern must use the required
> attribute to mark the control as required, and there are reasons why an
> author may not want to use the required attribute such as they do not want
> the associated UI and behaviour that is implemented by some user agents for
> the required attribute. Thus in the example above providing the author with
> the means to convey the required state to acc APIs via aria-required will
> improve the accessibility of the pattern.

I could accept the behavior you want, but as it's written in the spec, it conflicts with itself because @required is a Boolean attribute. You need to make either one of these changes:

1. Either define the "false" state of @required in the Strong Native Semantics table, where you currently have only the "true" state. (This would effectively mean @aria-required had no effect on form elements that accept @required.)

2. Move all the mentioned of @required and @aria-required from the Strong Native Semantics table to the implicit ARIA semantics. (This would allow the behavior you appear to desire and have outlined above.)
Comment 5 James Craig 2013-09-27 17:34:56 UTC
*** Bug 23376 has been marked as a duplicate of this bug. ***
Comment 6 steve faulkner 2013-09-28 08:19:41 UTC
(In reply to James Craig from comment #4)
> (In reply to steve faulkner from comment #2)
> 
> > I think there are legitimate use cases for allowing aria-required on
> > elements without the required attribute.
> > 
> > It is common practice to have a a control that is marked as required in text
> > for example using an asterisk:
> > 
> > <label>name * <input></label>
> > 
> > It is not a requirement in HTML5 that this pattern must use the required
> > attribute to mark the control as required, and there are reasons why an
> > author may not want to use the required attribute such as they do not want
> > the associated UI and behaviour that is implemented by some user agents for
> > the required attribute. Thus in the example above providing the author with
> > the means to convey the required state to acc APIs via aria-required will
> > improve the accessibility of the pattern.
> 
> I could accept the behavior you want, but as it's written in the spec, it
> conflicts with itself because @required is a Boolean attribute. You need to
> make either one of these changes:
> 
> 1. Either define the "false" state of @required in the Strong Native
> Semantics table, where you currently have only the "true" state. (This would
> effectively mean @aria-required had no effect on form elements that accept
> @required.)
> 
> 2. Move all the mentioned of @required and @aria-required from the Strong
> Native Semantics table to the implicit ARIA semantics. (This would allow the
> behavior you appear to desire and have outlined above.)

Hi james,

> I could accept the behavior you want

Do you consider the use case i outlined is reasonable? 

I will follow you advice and move into implicit only table, but will keep restraint that when required is present aria-required, if specified, must be set to true. Sound OK?
Comment 7 github bugzilla bot 2013-09-28 18:48:40 UTC
Commit pushed to master at https://github.com/w3c/html

https://github.com/w3c/html/commit/4b4837be983f1c9ac3f0942b88401d2908665e1d
moved required from strong to implicit table

see bug 23377
Comment 8 James Craig 2013-10-01 08:34:49 UTC
I'm fine with that edit. Thanks Steve.
Comment 9 steve faulkner 2013-10-01 08:41:05 UTC
(In reply to James Craig from comment #8)
> I'm fine with that edit. Thanks Steve.

EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:

   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see comment 7
Rationale: agreed with commenter that the rules should be in the implicit semantics table
Comment 10 github bugzilla bot 2014-01-16 15:11:02 UTC
Commits pushed to CR at https://github.com/w3c/html

https://github.com/w3c/html/commit/ab7e3f79a055b6490f52b316283efec9f2d90440
explicitly allow aria-required

https://github.com/w3c/html/commit/7164e921de9185e122778a3cd22cb7e81fc171b5
added select as allowed to have aria-required

https://github.com/w3c/html/commit/4b4837be983f1c9ac3f0942b88401d2908665e1d
moved required from strong to implicit table
Comment 11 James Craig 2014-05-08 17:55:40 UTC
*** Bug 23376 has been marked as a duplicate of this bug. ***
Comment 12 James Craig 2014-05-08 21:38:31 UTC
Continued in bug 25614.