[added] accessibility props for PanelGroup and Panels.#1191
[added] accessibility props for PanelGroup and Panels.#1191jquense merged 2 commits intoreact-bootstrap:v0.25-rcfrom
Conversation
Signed-off-by: Kenny Wang <kwang@pivotal.io>
|
Oops. Forgot PropType validation. I'm also not sure if these roles should be exposed. |
| header = cloneElement(header, { | ||
| className, | ||
| children: this.renderAnchor(header.props.children) | ||
| children: this.renderAnchor(header.props.children, headerRole) |
There was a problem hiding this comment.
Would it be incorrect for the header role to actually get attached to the "heading" element at https://github.com/react-bootstrap/react-bootstrap/pull/1191/files#diff-1e26d9c69579835d9b0137815187fafeR185 rather than the anchor?
There was a problem hiding this comment.
The use-case we're anticipating here is using an accordion like a set of tabs, as in the example in the react-bootstrap documentation. Based on our research, the a is the correct place to put the role attribute. Here's one blog post that confirms this.
|
BTW, would appreciate seeing your thoughts on discussion on #983 from #983 (comment) on down, i.e. we might structure <Panel>
<Panel.Heading>{heading}</Panel.Heading>
<Panel.Body>{body}</Panel.Body>
</Panel>and then this would just work with the |
Signed-off-by: Dominick Reinhold <dreinhold@pivotal.io> Signed-off-by: Matt Royal <mroyal@pivotal.io>
20bf427 to
adad32e
Compare
|
@mattroyal and I just amended the last commit to add Edited to add: Just looking at #983 now and seeing that it addresses this issue. I left some thoughts on changing the API. |
|
LGTM. Might make sense to squash these commits. Otherwise |
|
LGTM |
[added] accessibility props for PanelGroup and Panels.
Adds accessibility, following the guideline specified here.
The Pivotal UI Team
@atomanyih @ctaymor @d-reinhold @kennyw12 @matt-royal @nicw @stubbornella