Code Monkey home page Code Monkey logo

Comments (4)

jnurthen avatar jnurthen commented on May 28, 2024

While something like this would impact the accname spec it would fit in aria not accname. Any proposals which need new attributes would be better logged in the aria repository.
However, I think we are unlikely to go down this path as it would add more complexity to something that is already complex enough.

That being said we are looking at a few other possibilities for labeling. The current editors draft has 2 new ways of labeling a limited number of roles - see http://w3c.github.io/aria/#namecalculation and look for encapsulation and legend. Note that (a) this is not applicable across all roles and (b) it is not implemented anywhere yet.

from accname.

jimmyfrasche avatar jimmyfrasche commented on May 28, 2024

I'm reading that as:

  • a direct descendant with role=label does the equivalent of aria-labelledby
  • a direct descendant with role=legend does the equivalent of aria-describedby

And hence I could write

<article>
  <div role=label><h2>Name of article</h2></div>
  <div role=legend>Description of article</div>
  stuff
</article>

instead of

<article aria-labelledby=label aria-describedby=legend>
  <div id=label><h2>Name of article</h2></div>
  <div id=legend>Description of article</div>
  stuff
</article>

Is that correct? If so, that would certainly be good enough for me and I look forward to years of grousing about how no one supports it yet.

from accname.

jnurthen avatar jnurthen commented on May 28, 2024

@jimmyfrasche No. This will only be allowed for certain roles which support these. Generally label will only work for widgets (like in HTML LABEL) and Legend for groups (like HTML fieldset).
There is also a proposal to allow a descendent Header to label something but it isn't advanced. See https://github.com/w3c/aria/issues/899 for more details although the minutes of the F2F meeting this week aren't yet in the issue.

from accname.

jimmyfrasche avatar jimmyfrasche commented on May 28, 2024

That's too bad. This only really presents an issue for stuff like article. Coming up with id's for forms isn't as fraught. It looks like the linked issue is the best place to discuss this further. Thank you for your time and help.

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.