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

PageHeader "back" button is just a clickable <div> which isn't semantically correct #16038

Closed
Stephen2 opened this issue Apr 12, 2019 · 1 comment

Comments

Projects
None yet
4 participants
@Stephen2
Copy link

commented Apr 12, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

The "back" button should be an actual <button> element if it just exposes an onClick, OR it could possibly be an <a> element, if it accepted an href property.

Either way, a clickable <div> is no good, because keyboard users can't TAB to it - breaking accessibility

What does the proposed API look like?

No API change, for starters, just make the back arrow render inside a <button>.

This might fit well with the propsed #15892 <-- allow Button to look like plain hyperlink/text

@zombieJ

This comment has been minimized.

Copy link
Member

commented Apr 15, 2019

Nice catch.
@chenshuai2144 , it should use transButton instead: https://github.com/ant-design/ant-design/blob/master/components/_util/transButton.tsx

GitHub
🌈 A UI Design Language. Contribute to ant-design/ant-design development by creating an account on GitHub.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.