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

use a tag instead of abbr tag for search-choice-close #2726

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

koenpunt
Copy link
Collaborator

fixes #495

@koenpunt
Copy link
Collaborator Author

@mlettini do you have anything to say about this?

@mlettini
Copy link
Contributor

  • +1 to not using the abbr tag for this... forget why it was done in the first place!
  • Now that we're using an <a>, I think we need to add more reset properties to .search-choice-close just to make sure that a page's base styles don't break it, something like: { margin:0; padding:0; border:0; }, though potentially other properties too...
  • The above is not a +1 to the JS which needs another dev to look at it 👌

@selected_item.down("span").insert { after: "<abbr class=\"search-choice-close\"></abbr>" } unless @selected_item.down("abbr")
@selected_item.addClassName("chosen-single-with-deselect")
unless @selected_item.down('.search-choice-close')
@selected_item.down('span').insert { after: '<a class="search-choice-close"></a>' }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as there is no href, this won't get a pointer cursor in a cross-browser way (and browsers not showing it are perfectly fine according to the spec)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 28-30 of sass/chosen.scss force a cursor to all links within .chosen-container, but I agree that no href is less semantic.

Copy link
Collaborator

@stof stof Oct 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

proper semantic would probably be a <button type="button"> rather than a <a> btw.

@koenpunt
Copy link
Collaborator Author

Updated per @stof's comment about using a button. Removed some duplicate CSS in the process.

@koenpunt koenpunt moved this from 1.7.0 to 1.8.0 in Chosen Progress Mar 24, 2017
@JJJ JJJ mentioned this pull request Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Do not use <abbr> tag
3 participants