-
Notifications
You must be signed in to change notification settings - Fork 29
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
Fix: compile item text (fixes #173) #174
Conversation
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.
Looks good @kirsty-hames, should also add compile to matchingDropDown.jsx so we can use it in the drop down lists?
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.
👀
Thanks for the suggestion @joe-allen-89. If I do the same for matchingDropDown, the I've tried using |
text={text} v5.0.0 hbs
It's just left over from old code. It should be safe to remove. |
legacy code carried over from v5.0.0 hbs not needed
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.
👍
🎉 This PR is included in version 7.3.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
value={_index} | ||
aria-selected={_isHighlighted || null} | ||
selected={_isHighlighted || null} | ||
onClick={onOptionClicked} | ||
> | ||
<div className="dropdown-item__inner js-dropdown-list-item-inner u-no-select" dangerouslySetInnerHTML={{ __html: displayText || text }}> | ||
<div className="dropdown-item__inner js-dropdown-list-item-inner u-no-select" dangerouslySetInnerHTML={{ __html: displayText || compile(text) }}> |
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.
compile doesn't exist in this file as it wasn't imported
Fixes #173
To support the use of a11y_alt_text helper tag.
PR Test
Add
a11y_alt_text
helper to Matching itemtext
e.g.{{a11y_alt_text '$5bn' 'five billion dollars'}}
.In your course, go to the Matching item and '$5bn' should be displayed.
Using the browser devtools, inspect '$5bn' and the helper should have split out the on screen text and a11y text e.g.
<span aria-hidden="true">$5bn</span><span class="aria-label">five billion dollars</span>