- From: Joseph Scheuhammer <clown@alum.mit.edu>
- Date: Mon, 21 Apr 2014 10:58:37 -0400
- To: public-pfwg@w3.org
Bryan wrote:
> Hi Birkir, you can control the association by not setting
> aria-describedby until the error is made visible, then when focus is
> set to the field after this, it will be announced.
>
What Bryan said.
Furthermore, aria-describedby is intended to provide a good description
of the associated form field. Setting that description permanently to
"invalid field" is not a good description. In fact, it's a false
description when the field is valid. That's an author error. It's
analogous to setting aria-invalid="true" on the field and never changing
it, regardless of the contents of the field. (Aside: authors should be
using aria-invalid as well in the scenario described).
Steve wrote:
> yes, refer to section 5.6.1.3. Text Alternative Computation of the
> ARIA implementation guide:
> http://www.w3.org/WAI/PF/aria-implementation/#mapping_additional_nd
>
>
> Skip hidden elements unless the author specifies to use them via
> an |aria-labelledby| or |aria-describedby| being used in the
> current computation. By default, users of assistive technologies
> won't receive the hidden information, but an author will be able
> to explicitly override that and include the hidden text
> alternative as part of the label string sent to the accessibility API.
>
A use case is where aria-describedby references a tooltip. The
visibility of the tooltip varies over time -- it pops up and vanishes
depending on what the user does. Nonetheless, the tooltip text remains
the same, and is available to the user/AT via the accessibility API. In
general, the visibility of a description is orthogonal to that
description's text.
Aside: Recently, FireFox added support for a "description-changed"
event when description text changes [1]. That event is part of the
accessibility API (e.g, IA2, ATK). Going forward, these events are
useful in situations where a description changes, including those that
depend on the validity of a form field, and the description is
referenced using aria-describedby.
Hope that helps.
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=991969
--
;;;;joseph.
'A: After all, it isn't rocket science.'
'K: Right. It's merely computer science.'
- J. D. Klaun -
Received on Monday, 21 April 2014 14:59:04 UTC