Code Monkey home page Code Monkey logo

Comments (8)

devarshipant avatar devarshipant commented on May 28, 2024 1

The phrase "...provides an attribute (e.g. title)" could be unclear to some readers.
Does a placeholder attribute value qualify to be the flat string (accessible name) when no other element (like, label) is present? What happens when both placeholder and title are present?

  1. For example, what would be the accessible name in the example below with only placeholder?
<input type="text" placeholder="User Name">
<input type="password" placeholder="Password">
  1. With title + placeholder?
<input type="text" placeholder="User Name" title="Email is username">

from accname.

accdc avatar accdc commented on May 28, 2024

At present in 1.1, the fields with only placeholder would have no accessible name because placeholder isn't listed as a valid labeling mechanism, but those with a title attribute would have the accessible name set to the title attribute because no prior mechanism is available.

For 1.2, it seems logical to me that placeholder would be treated like a title and be set as a name as a last resort, but only after title, and if both are present like above, then title would be set to the name and placeholder set to the description.

from accname.

jnurthen avatar jnurthen commented on May 28, 2024

This could be related to #11 HTML-AAM should define what happens in these examples per https://w3c.github.io/html-aam/#input-type-text-input-type-password-input-type-search-input-type-tel-input-type-url-and-textarea-element

from accname.

accdc avatar accdc commented on May 28, 2024

We will also need to map the same thing to aria-placeholder.

from accname.

mraccess77 avatar mraccess77 commented on May 28, 2024

In the HTML AAM title is listed as the last naming mechanism for input type text and anchor. For anchor it comes after the sub-tree. The approach from the AAM seems correct -- so how can that be worked into the name calculation algorithm? It seems like title should only be used when no other mechanism is available. I personally don't think placeholder should be used at all for the accessible name calculation but would be fine with it for description.

from accname.

mcking65 avatar mcking65 commented on May 28, 2024

Why hoist placeholder into the description? Do AT have no way to access placeholder if they choose to render it? It seems to me that hearing a placeholder as a description just as often be confusing as helpful.

from accname.

mraccess77 avatar mraccess77 commented on May 28, 2024

Fine be me if we want to separate out placeholder into something else. It just seems like there is a limited set of properties that map to platform accessibility APIs.

from accname.

stevefaulkner avatar stevefaulkner commented on May 28, 2024

Note: the HTML-AAM no longer defines the use of placeholder as a fallback description refer to the change log.

21-Nov-2016: Removed placeholder attribute from accessible description computation for various input elements.

This was changed some while ago after discussion and the introduction of aria-placeholder. The original definition was due to there being no unique defined mapping for placeholder, which as of aria 1.1 is no longer the case.

from accname.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.