expose placeholder object attribute for HTML placeholder




2 years ago
8 months ago


(Reporter: surkov, Assigned: abhishek.1si14cs006)


(Blocks: 1 bug, {good-first-bug})

Firefox Tracking Flags

(Not tracked)




2 years ago
here's a link on IA2 thread Jamie's post:


fix HTMLTextFieldAccessible::NativeAttributes() to expose placeholder,
add a test into test_HTMLSpec.html


2 years ago
Blocks: 389237

Comment 1

2 years ago
Related to this: It's been exposed for years on my platform with attribute name "placeholder-text." While I could add checks for attributes named "placeholder," it would be nice if it were exposed consistently. Therefore, could we do a couple of things:

1. Expose it with attribute name "placeholder-text"

2. Expose the aria-placeholder value with attribute name "placeholder-text" (even though that doesn't follow the rule of naming attributes by removing the "aria-")

If that's a problem on IA2 (hopefully it's not), would it be possible to just expose it as described for ATK?

Comment 3

2 years ago
(In reply to alexander :surkov from comment #2)
> I went on IA2 asking for opinions, see
> https://lists.linuxfoundation.org/pipermail/accessibility-ia2/2016-October/
> 002200.html

And Jamie indicated placeholder-text was alright with him: https://lists.linuxfoundation.org/pipermail/accessibility-ia2/2016-October/002201.html

And it's in the Core AAM as placeholder-text: https://rawgit.com/w3c/aria/master/core-aam/core-aam.html#ariaPlaceholder

So.... Ping?

Comment 4

2 years ago
Related: have filed bugs on chrome and edge to update current implementations

What steps will reproduce the problem?
(1) open http://s.codepen.io/stevef/debug/jmWrxV/dXMqBbOKgnPr
(2) check the accessible name value for the 2 text inputs

What is the expected result?
the value of the placeholder and aria-placeholder is exposed via the placeholder property (for example in IA2 a placeholder-text object attribute)

What happens instead?

the value of the placeholder and aria-placeholder is exposed via the acc name property 

Please use labels and text to provide additional information.

mapping for placeholder - https://w3c.github.io/html-aam/#att-placeholder

placeholder maps to aria-placeholder defined here: http://w3c.github.io/aria/core-aam/core-aam.html#ariaPlaceholder

Note: the current implemented mapping was correct at time, but since then placeholder properties have been added to acc APIs to handle the attribute

Comment 5

a year ago
Just to make matters more interesting, when there's no label, Chrome exposes placeholder using the "placeholder" attribute, not "placeholder-text" as discussed on the IA2 list (for consistency with ATK). Firefox also uses "placeholder" for aria-placeholder. As a result, in order to support placeholder (since there hasn't been any movement on this), NVDA now supports the "placeholder" attribute, not "placeholder-text".

Do other Windows AT support placeholder in Firefox/Chrome? If they do, they too possibly rely on the "placeholder" object attribute.

As much as this really sucks, pragmatically, I think IA2 and ATK are going to need to diverge here. The alternative is to update any AT with existing implementations to use the new attribute. We could do this for NVDA, but it'd be good to have an answer on what other Windows AT are using.

Dominic, any idea whether other Windows AT are relying on the "placeholder" IA2 object attribute?
Flags: needinfo?(dmazzoni)


a year ago
Priority: -- → P3

Comment 6

9 months ago
Jamie, so should we use placeholder-text both for IA2 and ATK? and should we keep placeholder for a transition period (not sure how long it can be)?
Flags: needinfo?(jteh)

Comment 7

9 months ago
Given that Chrome (and thus NVDA and probably other AT) have been using "placeholder" in the wild for months (and several releases) now, my vote would be to go for the pragmatic path and use "placeholder" for IA2 and "placeholder-text" for ATK. Divergence isn't ideal, but nor is the tedium of advocating for updates across projects and dealing with backwards compat pain. We should note this divergence in the IA2 attributes spec, though.
Flags: needinfo?(jteh)

Comment 8

8 months ago
I would like to work on this bug. Can I get assigned to it please?


8 months ago
Assignee: nobody → abhishek.1si14cs006
Flags: needinfo?(dmazzoni)
You need to log in before you can comment on or make changes to this bug.