DEV Community

Discussion on: What Are :before and :after Pseudo Elements?

Collapse
 
maxfontana90 profile image
maxfontana90

I think it's worth to mention that this could bring accesibility issues to your webpage. Imagine you have a class like the following:

.required::after {
content: "*";
}

that is intended to be used in form inputs to highlight those that are mandatory. The approach would prevent accesible guests to be aware of which fields are required, since the * symbol has a contextual meaning.

Collapse
 
neshaz profile image
Nesha Zoric

Thanks for mentioning it! Because of accessibility issues, the usage of these pseudo elements should definitely be well planned.