Valip
Valip

Reputation: 4610

How to add css styles on aria-hidden attribute

Can an element have styles depending on the aria-hidden attribute?

Here is an example of how I want it to work:

HTML:

<div aria-hidden="false" class="text">text here</div>

CSS:

aria-hidden["false"] {
    color:red;
}

Upvotes: 4

Views: 15979

Answers (1)

Fabrizio Calderan
Fabrizio Calderan

Reputation: 123367

Almost:

[aria-hidden="false"] {
    color:red;
}

This is called attribute selector

Upvotes: 13

Related Questions