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

Spinbutton: Allowed structures? #826

Open
mcking65 opened this issue Aug 7, 2018 · 0 comments
Open

Spinbutton: Allowed structures? #826

mcking65 opened this issue Aug 7, 2018 · 0 comments
Labels
Pattern Page Related to a page documenting a Pattern question Issue asking a question

Comments

@mcking65
Copy link
Contributor

mcking65 commented Aug 7, 2018

After another reading of the ARIA spinbutton specification, I am wondering how we should structure the spinbutton and whether or not we need multiple examples, each with a different structure. The spec says:

Authors MAY create a spinbutton with children or owned elements, but MUST limit those elements to a textbox and/or two buttons.

It also says:

When a spinbutton receives focus, authors SHOULD ensure focus is placed on the textbox element if one is present, and on the spinbutton itself otherwise. Authors SHOULD NOT include contained button elements in the primary navigation ring, e.g., the Tab ring in HTML, because they are superfluous for people using keyboard devices.

The above text is describing a composite structure like:

<div role="spinbutton">
  <button tabindex="-1">decrease</button>
  <input type="text">
  <button tabindex="-1">Increase</button>
</div>

Another structure supported by this spec language is:

<div role="spinbutton" tabindex="0">
  <span>Decrease</span>
  <span>text of value</span>
  <span>Increase</span>
</div>

However, I've normally seen a flat structure like:

<button tabindex="-1">decrease</button>
<input type="text" role="spinbutton">
<button tabindex="-1">Increase</button>

Now, I'm wondering if this latter structure is actually allowed? The spec does not appear to support it. Should it?

Related to issue #125.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pattern Page Related to a page documenting a Pattern question Issue asking a question
Development

No branches or pull requests

1 participant