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

Documentation for Smart Select recommends invalid HTML #628

Closed
ekwoka opened this issue Nov 9, 2023 · 3 comments · Fixed by #629
Closed

Documentation for Smart Select recommends invalid HTML #628

ekwoka opened this issue Nov 9, 2023 · 3 comments · Fixed by #629

Comments

@ekwoka
Copy link
Contributor

ekwoka commented Nov 9, 2023

https://framework7.io/docs/smart-select

Here all the examples show an a tag around the select.

This is outside of spec.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#technical_summary

@nolimits4web
Copy link
Member

And it is still valid and works totally fine everywhere

@ekwoka
Copy link
Contributor Author

ekwoka commented Nov 21, 2023

So you disagree with the HTML Working Group?

@ekwoka
Copy link
Contributor Author

ekwoka commented Nov 21, 2023

Also, it does NOT "work totally fine everywhere"

Example:

https://play.tailwindcss.com/gGIEhYd4j5

This produces two focusable elements that are indistinguishable when tabbing.

And for what?

what does an a do there that's useful? Why isn't it just a div? or span?

So to summarize:

  1. It's out of spec to put a select inside an a
  2. It creates two focusable elements, one of which won't really work
  3. It adds nothing to the implementation over alternative element choices.

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

Successfully merging a pull request may close this issue.

2 participants