Git Product home page Git Product logo

aria-api's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

aria-api's Issues

aria-api looks at placeholder

getName() on an input element will return the placeholder content, which does not appear to be behaviour specified by Accessible Name and Description Computation 1.1 or draft 1.2 as far as I can tell (although it is what Chrome does).

noscript contents are ending up in the output

aria-api should be ignoring the contents of <noscript> elements. These elements turn their contents into text nodes, even though their contents is in fact HTML. So the accessibility name/description end up being a load of gibberish HTML for any element that contains a noscript element.

Implement document outline

At the moment, implicit aria-level for headings is simply calculated by using the number from the tag name. This ignores the HTML5 document outline algorithm.

The outline algorithm has never been implemented. But three days ago a new proposal has given new hope to the idea:

https://github.com/whatwg/html/issues/83#issuecomment-359871505

It seems like this is the final attempt. Either the outline algorithm will be removed from the spec (in which case nothing needs to be changed about aria-api) or it will be replaced by a new version that will be easier to implement.

Missing cases

Hi, thanks for the work on this code. I want to use the getName API for something else that I am building, so i was testing some of the cases and realised that 5.2 was not working.

https://www.w3.org/TR/html-aam-1.0/#input-type-button-input-type-submit-and-input-type-reset-accessible-name-computation

my tests were

  describe('5.2 button input should behave like buttons', () => {
    test('it uses value', () => {
      document.body.innerHTML = `
        <input id="el" type="button" value="the world! dog!"/>
      `;
      const foundInput = findControl('the world! dog!');
      expect(foundInput).toEqual(document.getElementById('el'));
    });

    test('deafults submit if no content', () => {
      document.body.innerHTML = `
        <input id="el" type="submit"></input>
      `;
      const foundInput = findControl('submit');
      expect(foundInput).toEqual(document.getElementById('el'));
    });

    test('deafults reset if no content', () => {
      document.body.innerHTML = `
        <input id="el" type="reset"></input>
      `;
      const foundInput = findControl('reset');
      expect(foundInput).toEqual(document.getElementById('el'));
    });
  });

would love to get your thoughts if this should be handled by the tool or if it shouldn't be?

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.