Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing cases #4

Open
billybonks opened this issue Jan 27, 2020 · 1 comment
Open

Missing cases #4

billybonks opened this issue Jan 27, 2020 · 1 comment

Comments

@billybonks
Copy link

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?

@xi
Copy link
Owner

xi commented Feb 1, 2020

The trouble here is that it is not at all clear which of the HTML-AAM and accname specs takes precedence. See also w3c/accname#8. At least that is the last info I got on this mess.

So far I have been concentrating on accname. Honestly, I don't think it is worth the time to work on HTML-AAM as long as the spec authors cannot decide what they want.

Btw, I am not completely sure where aria-api is used in the code you posted. I guess somewhere in findControl()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants