Skip to content

Conversation

@koenpunt
Copy link
Contributor

fixes #495

@koenpunt
Copy link
Contributor Author

@mlettini do you have anything to say about this?

@mlettini
Copy link

  • +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
Contributor

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)

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
Contributor

@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
Contributor Author

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

@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

None yet

Development

Successfully merging this pull request may close these issues.

Do not use <abbr> tag

4 participants