Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Flesh out description of tabIndex property in docs for tabs component #1868

Closed
blackbaud-johnly opened this issue Aug 1, 2018 · 3 comments
Closed
Assignees

Comments

@blackbaud-johnly
Copy link
Contributor

The current description of the tabIndex property is not very clear. My assumption is that the property reflects a tab's position in regards to display order and that tabIndex indicates where a tab is displayed relative to other tabs from left to right. (And that if tabIndex isn't set, then it is assigned, then a value is assigned based on default order, although I'm not sure what determines the default order.) Look into whether this is actually how the property works and update the description in the docs.

@Blackbaud-AlexKingman is looking into a possible bug with the property, so coordinate with him on the docs update.

@Blackbaud-AlexKingman
Copy link
Contributor

Thanks for starting this @blackbaud-johnly !

Here's what I found out on investigation:

  1. tabIndex is the unique identifier of the tab - NOT an ordering mechanism. The word "index" here might be a bit misleading. I think something more like tabId would be more appropriate but that would be a considerable change. Maybe what we can do in the meantime is just make sure the docs are clear on its intent.
  2. tabIndex will accept both a number and a string.
  3. When not defined, tabIndex will be generated for you, starting with 0 and working up incrementally.

@Blackbaud-AlexKingman
Copy link
Contributor

Let's go with this:

tabIndex — (Optional.) The unique identifier of the tab. If not defined, it will be set to the position of the tab on load, starting with 0.

Feel free to wordsmith as you see fit :)

@blackbaud-johnly
Copy link
Contributor Author

Addressed in blackbaud/skyux2-docs#206.

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

No branches or pull requests

3 participants