There is probably an easy solution for this:
I have some data in a controller, depending if item is selected it should display some html and if it's not selected it should display some other html.
If item is selected html should be:
<li> <a target='_blank' href="#"><span class="fa fa-check" aria-hidden="true"></span> <span class="sr-only">Selected:</span>Worldwide</a> </li>
If item is not selected html should be:
<li> <a target='_blank' href="/example/link">Link</a> </li>
This would be easily solved if I only had to change the class attribute, then I could something like
But I also need to add
aria-hidden="true" if it's selected and remove it if it's not selected.