Frage

I need to be sure that the cell content will be indexed by Google (and other search engines) with the label. In my case I can't put label directly in td tag

html:

<td><a href="#" aria-label="prof. ">Jan Kowalski</a></td>

css:

a:before {
    content: attr(aria-label);
}

How this cell will be indexed by google? only 'Jan Kowalski' or maybe 'prof. Jan Kowalski'?

War es hilfreich?

Lösung

There is no evidence of search engines paying any attention to ARIA attributes. They are not meant for such use but for making application-like HTML documents more accessible. In particular, aria-label associates an “accessible name” for an “object”, which is expected to be interactive, such as a button, and the “accessible name” suggests what the button or other element does.

So it is very unrealistic to expect that search engines extract information from such attributes. They index textual content, though they may additionally index some data in some meta tags or selected attributes, mainly alt and title.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top