-
Notifications
You must be signed in to change notification settings - Fork 419
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
Search improvements #913
Search improvements #913
Conversation
lib/features/search-pad/SearchPad.js
Outdated
@@ -525,7 +486,7 @@ function createHtmlText(tokens) { | |||
|
|||
tokens.forEach(function(t) { | |||
if (t.matched) { | |||
htmlText += '<strong class="' + SearchPad.RESULT_HIGHLIGHT_CLASS + '">' + escapeHTML(t.matched) + '</strong>'; | |||
htmlText += '<b>' + escapeHTML(t.matched) + '</b>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we remove the ability to customize here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, let's keep using semantic html. <strong>
for important stuff, <em>
for emphasis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can revert the CSS class removal.
For <b>
vs <strong>
I'd disagree based on what I read.
The element is for content that is of greater importance, while the element is used to draw attention to text without indicating that it's more important.
I'd say we only want the styling, not the importance.
Each element is meant to be used in certain types of scenarios, and if you want to bold text for decoration, you should instead actually use the CSS font-weight property.
So you could even argue we don't want to use tags at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In terms of a11y, <strong>
matters to screen readers while <b>
doesn't which is what I'd expect in that case. I wouldn't expect the screen reader to focus on specific parts of the results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for "just for decoration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how the tag meaning was changed from "<b>oldface" to "<b>ring attention". I'm ok with leaving it as is.
734ed74
to
4704746
Compare
Heads-up: I reviewed this but somehow the remarks were lost. Going to repeat, once back from FTO. |
I'll look into this today. |
4704746
to
845b6c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works great, and I believe this also fixes a downstream issue: bpmn-io/bpmn-js#2189 Let's mark it on the PR.
I'd suggest to squash the changes as there are so many commits now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great 👍
Improves search by
Related to bpmn-io/bpmn-js#2187