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 28409 - should we include placeholder attribute in accessible name calculation?
Summary: should we include placeholder attribute in accessible name calculation?
Status: RESOLVED INVALID
Alias: None
Product: ARIA
Classification: Unclassified
Component: HTML AAM (show other bugs)
Version: Future
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: steve faulkner
QA Contact:
URL:
Whiteboard:
Keywords:
: 28270 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-04-06 11:49 UTC by steve faulkner
Modified: 2018-05-03 21:20 UTC (History)
9 users (show)

See Also:
faulkner.steve: needinfo? (jcraig)
faulkner.steve: needinfo? (cyns)
faulkner.steve: needinfo? (dominicc)
faulkner.steve: needinfo? (jdiggs)


Attachments

Description steve faulkner 2015-04-06 11:49:59 UTC
There is discussion on the PF list about whether implementations should include @placeholder values in the accessible name calculation [1] for elements that allow placeholder. Currently this spec requires that implementations use placeholder as a fallback acc name source when other sources are not available.

[1] https://lists.w3.org/Archives/Public/public-pfwg/2015Apr/0061.html
Comment 1 alexander surkov 2015-04-06 13:17:20 UTC
Firefox uses it if accessible name wasn't provided otherwise. I think this makes sense not depending whether placeholder has own accessibility API mapping.
Comment 2 Jason Kiss 2015-06-10 02:10:26 UTC
There's currently the following note for the accessible name calculation involving @placeholder at [1]:

"When the placeholder and aria-placeholder attribute are both present, and the placeholder attribute is non-empty, the user agents MUST expose the value of the placeholder attribute, and ignore @aria-placeholder.  If @placeholder is empty, then user agents MUST expose the value of @aria-placeholder."

I'm wondering why this wouldn't be the other way around, namely @aria-placeholder winning over @placeholder? This would be consistent with the way that @aria-* typically overrides the usual author-supplied label or name.

And in terms of including @placeholder in the name calculation, I assume we're happy with the fact that this will make @placeholder a legitimate way to meet WCAG 2.0 SC 4.1.2 [2]?


[1] http://rawgit.com/w3c/aria/master/html-aam/html-aam.html#input-type-text-input-type-password-input-type-search-input-type-tel-input-type-url-and-textarea-element

[2] http://www.w3.org/TR/WCAG20/#ensure-compat-rsv
Comment 3 Jason Kiss 2015-06-10 02:14:13 UTC
Forgot to ask if we shouldn't also be mapping @placeholder to @aria-placeholder?
Comment 4 Jason Kiss 2015-06-10 02:16:30 UTC
*** Bug 28270 has been marked as a duplicate of this bug. ***
Comment 5 alexander surkov 2015-06-10 15:53:06 UTC
(In reply to Jason Kiss from comment #2)
> There's currently the following note for the accessible name calculation
> involving @placeholder at [1]:
> 
> "When the placeholder and aria-placeholder attribute are both present, and
> the placeholder attribute is non-empty, the user agents MUST expose the
> value of the placeholder attribute, and ignore @aria-placeholder.  If
> @placeholder is empty, then user agents MUST expose the value of
> @aria-placeholder."
> 
> I'm wondering why this wouldn't be the other way around, namely
> @aria-placeholder winning over @placeholder? This would be consistent with
> the way that @aria-* typically overrides the usual author-supplied label or
> name.

as I understand it the current trend is aria steps back before native markup if they are in conflict. So if the HTML control supports @placeholder then @aria-placeholder should be ignored and it should be considered as an author error.

(In reply to Jason Kiss from comment #3)
> Forgot to ask if we shouldn't also be mapping @placeholder to
> @aria-placeholder?

I'm not sure that mapping is correct word to describe the relationship, because we get into nonsense if @placeholder is mapped to @aria-placeholder, and @aria-placeholder is ignored when @placeholder is present. But surely @aria-placeholder is ARIA equivalent of HTML @placeholder and vice versa.
Comment 6 Jason Kiss 2015-06-10 20:25:07 UTC
There's this from the ARIA spec [1]:

"Authors need to associate elements in the document to a WAI-ARIA role and the appropriate states and properties (aria-* attributes) during its life-cycle, unless the elements already have the appropriate implicit WAI-ARIA semantics for states and properties. In these instances the equivalent host language states and properties take precedence to avoid a conflict while the role attribute will take precedence over the implicit role of the host language element."

That suggests as you say, that @placeholder should take precedence over @aria-placeholder. 

I'm now thinking I was just confused by this note re @placeholder following the name calculation section. Correct me if I'm wrong, but here "expose" does not have to do with using it as source in name calculation? And in that case the note should be moved to the @placeholder entry in the mapping table? 

But this does get me wondering about @aria-label taint precedence over a properly associated and explicit <label> In the name calculation? It would be author error to have both, but why does the ARIA value override native label feature for name calculation? Anyone care to edumacate me?

WRT mapping of @placeholder, I meant shouldn't its mapping leverage the same mapping for @aria-placeholder, ie we can point to it and note "Use WAI-ARIA mapping"?


[1] http://www.w3.org/TR/wai-aria-1.1/#usage
Comment 7 steve faulkner 2015-06-11 14:18:45 UTC
From the HTML side I would think that use of aria-placeholder on elements that use of placeholder is conforming, will be non-conformaing. I don't see any reason why aria-placeholder would be needed in this case, do you?
Comment 8 Jason Kiss 2015-06-15 02:53:22 UTC
Making @aria-placeholder non-conforming when used on element with conforming @placeholder makes sense. Where does this non-conformance get expressly noted?
Comment 9 alexander surkov 2015-07-16 14:42:29 UTC
(In reply to Jason Kiss from comment #8)
> Making @aria-placeholder non-conforming when used on element with conforming
> @placeholder makes sense. Where does this non-conformance get expressly
> noted?

it's a good question, which spec should take care of it, both?
Comment 10 Jason Kiss 2015-07-29 03:04:22 UTC
(In reply to alexander surkov from comment #9)
> (In reply to Jason Kiss from comment #8)
> > Making @aria-placeholder non-conforming when used on element with conforming
> > @placeholder makes sense. Where does this non-conformance get expressly
> > noted?
> 
> it's a good question, which spec should take care of it, both?

Should it be noted in ARIA in HTML? https://specs.webplatform.org/html-aria/webspecs/master/#docconformance
Comment 11 Rich Schwerdtfeger 2015-07-29 16:04:30 UTC
placeholder should not be part of the name calculation. Please link to the Core accessibility api mapping spec. for how to map placeholder. aria-placeholder is part of ARIA 1.1
Comment 12 steve faulkner 2015-07-29 16:24:04 UTC
(In reply to Rich Schwerdtfeger from comment #11)
> placeholder should not be part of the name calculation. Please link to the
> Core accessibility api mapping spec. for how to map placeholder.
> aria-placeholder is part of ARIA 1.1

hi Rich, so browsers should remove their current @paceholder acc name implementations? I think that will result in a lot of form fields without accessible names.
Comment 13 steve faulkner 2015-07-30 19:07:33 UTC
(In reply to Rich Schwerdtfeger from comment #11)
> placeholder should not be part of the name calculation. Please link to the
> Core accessibility api mapping spec. for how to map placeholder.
> aria-placeholder is part of ARIA 1.1

The ARIA wg have concluded that placeholder is not to be used as a fallback source for accessible name, can browser reps respond to this and commit to changing any current implementations?
Comment 14 steve faulkner 2015-07-30 19:28:00 UTC
I had a look back through the minutes of PF and ARIA meetings for the last month or so trying to find discussion on placeholder, to no avail. If anyone can point me to discussion of the issue other than the April PF thread i cited in the Description of this bug, it would be much appreciated.
Comment 15 steve faulkner 2015-07-30 19:32:21 UTC
note: currently all browsers map placeholder to acc name when no other source of acc name is found
http://www.html5accessibility.com/tests/placeholder-labelling.html
Comment 16 alexander surkov 2015-08-05 12:43:30 UTC
I would disagree with wg conclusion because
* that will regress the web accessibility. HTML5 placeholder a11y mapping exists for years and adopted by the web, while the proposed mapping is not yet supported by all browsers and all ATs.
* that may be semantically incorrect since the web authors do use placeholder instead labels occasionally.
Comment 17 James Nurthen 2018-05-03 21:20:23 UTC
HTML AAM is no longer an ARIA Deliverable. If you wish to pursue this issue please file at https://github.com/w3c/html-aam/issues