Re: Bug: Firefox Accessibility Inspector reports placeholder attribute as eligible for accessible name

> So, wise AGers, which is correct?  The W3C Accessible Name Calc Spec?  Or
Firefox Accessibility Inspector?


According to the WHAT WG Version of HTML
<https://html.spec.whatwg.org/multipage/input.html#the-placeholder-attribute>
the
W3C Name Calculation is correct:

4.10.5.3.10 The placeholder
<https://html.spec.whatwg.org/multipage/input.html#attr-input-placeholder>
 attribute

The placeholder attribute represents a *short* hint (a word or short
phrase) intended to aid the user with data entry when the control has no
value. A hint could be a sample value or a brief description of the
expected format. The attribute, if specified, must have a value that
contains no U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) characters.
The placeholder
<https://html.spec.whatwg.org/multipage/input.html#attr-input-placeholder>
attribute
should not be used as an alternative to a label
<https://html.spec.whatwg.org/multipage/forms.html#the-label-element>. For
a longer hint or other advisory text, the title
<https://html.spec.whatwg.org/multipage/dom.html#attr-title> attribute is
more appropriate.


The W3C version of HTML
<https://www.w3.org/TR/html5/sec-forms.html#the-placeholder-attribute> is
more explicit, via the Warning:

The placeholder attribute should not be used as a replacement for a label
<https://www.w3.org/TR/html5/sec-forms.html#elementdef-label>. For a longer
hint or other advisory text, place the text next to the control.

Use of the placeholder attribute as a replacement for a label
<https://www.w3.org/TR/html5/sec-forms.html#elementdef-label> can reduce
the accessibility and usability of the control for a range of users
including older users and users with cognitive, mobility, fine motor skill
or vision impairments. While the hint given by the control’s label
<https://www.w3.org/TR/html5/sec-forms.html#elementdef-label> is shown at
all times, the short hint given in the placeholder attribute is only shown
before the user enters a value. Furthermore, placeholder text may be
mistaken for a pre-filled value, and as commonly implemented the default
color of the placeholder text provides insufficient contrast and the lack
of a separate visible label
<https://www.w3.org/TR/html5/sec-forms.html#elementdef-label> reduces the
size of the hit region available for setting focus on the control.


In either case, I will suggest that Firefox is getting it 'wrong' *according
to the spec(s)*, but given the prevalence of forms today that are using
@placeholder text exclusively to label form inputs, I can understand
why *screen
readers* would ignore the spec in favor of their users, prescribing to the
"Priority of Constituents" philosophy of Users over Authors, Authors over
Implementors, and Implementors over Code Purity.

Given the other accessibility concerns around @placeholder text however
(noted in the W3C Warning but absent in the WHAT WG text), I would be quite
opposed to having the Accessible Name Calculation algorithm changed, and
would continue to +1 the bug as submitted to Mozilla.

JF

On Tue, Aug 7, 2018 at 1:17 PM, Glenda Sims <glenda.sims@deque.com> wrote:

> Dear AG,
>
> *TL:DR* - please read the a11y bug report and vote for it if you agree:
> https://bugzilla.mozilla.org/show_bug.cgi?id=1480831
>
> *Initial Response from Jamie at Mozilla *- the W3C name calc spec should
> be changed, not the FF accessible name calc.
>
> So, wise AGers, which is correct?  The W3C Accessible Name Calc Spec?  Or
> Firefox Accessibility Inspector?
>
> G
>
> PS - more detail
>
> *Bug Details:*
>
> There is a mistake in the way the Firefox Accessibility Inspector is
> calculating accessible name. It is currently reporting (for a field that
> only has a placeholder) that the placeholder is the accessible name.
>
> Code to test: <input type="text"  name="first"  placeholder="First Name"
> id="first">
> Sample of code to test: https://codepen.io/goodwitch/pen/OwEmEw
> Firefox Accessibility Inspector reports this field as having an accessible
> name of “First Name”
>
>
> *Actual results:*
>
> According to the W3C Accessible Name Calc, placeholder is not eligible to
> be considered when determining the accessible name.
> https://www.w3.org/TR/accname-1.1/
>
>
>
> *Expected results:*
>
> Firefox Accessibility Inspector should report the accessible name as null.
>
> *glenda sims* <glenda.sims@deque.com>, cpacc
> <http://www.accessibilityassociation.org/certification>   | team a11y
> lead | 512.963.3773
>
>         deque systems <http://www.deque.com>  accessibility for good
>



-- 
*John Foliot* | Principal Accessibility Strategist

Deque Systems - Accessibility for Good

deque.com

Received on Tuesday, 7 August 2018 19:39:19 UTC