Giter VIP home page Giter VIP logo

Comments (2)

estevezluis avatar estevezluis commented on June 3, 2024

I can see how the alt-text rule name can be interpreted as "alternative text", indicating aria-label, but I believe alt-text is related to image-alt

In https://dequeuniversity.com/rules/axe/4.8/label the rule description says

Each form element must have a programmatically associated label element.

Which closely relates to rule label-has-associated-control However, this does not check if an input has aria-label attribute.

I believe this was done intentionally not to encourage the use of ARIA as "No ARIA is better than Bad ARIA"1

I hope this helps clear the confusion 😄

Footnotes

  1. https://www.deque.com/blog/top-5-rules-of-aria/

from angular-eslint.

bgpedersen avatar bgpedersen commented on June 3, 2024

@estevezluis I don't understand your explanation ? In the rule source code, it is clearly stated in the description, that it involves alternative text with aria-label etc. ?

We want to have a warning/error when we have a button that says "upload file", but there is no visible label above. This is common use case. This rule should target that, or another rule should be created that does that, if this rule is only meant for images, but then the description of this rule is wrong. 🙏

link

export default createESLintRule<Options, MessageIds>({
  name: RULE_NAME,
  meta: {
    type: 'suggestion',
    docs: {
      description:
        '[Accessibility] Enforces alternate text for elements which require the alt, aria-label, aria-labelledby attributes.',
    },
    schema: [],
    messages: {
      altText: '<{{element}}/> element must have a text alternative.',
    },
  },

from angular-eslint.

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.