Archived topic
Editing link with aria-current='page' (current page)
3 replies · Started by AD on July 3, 2020
Hi,
When I try to edit the navigation bar through CSS, I run by a problem. Even though I am able to change the appearance of most elements in the navigation bar, there is one exception.
This exception is the link to the current page. As you can see in the HTML, this element has an extra attribute added to it: aria-current="page". Whenever an element has this attribute, it won't respond to any changes in the CSS.
I am looking for a way to remove the effect of this added attribute so I can change the appearance of the element.
I hope this is clear and thanks in advance.
Hi there,
Any chance you can link us to the site in question?
You can edit the original topic and use the private URL field.
Let me know :)
I am working locally unfortunately. Otherwise I could have shared the URL.
However I copied the specific element:
<a href="http://site.local/sample-page/" aria-current="page">Sample Page</a>
What CSS are you using that's not working?
Can you set up a staging environment so we can see the issue?
Problems like these are hard to debug without seeing the code.