HTML Validation Extension in Visual Studio Code reports invalid figure but it should be fine?

I use visual studio code and the site is still not online, but almost finished.

I’m a great fan of accessibility, so I use for example figure elements like this, i.e. with role=”group”:

""
blabla


Due to www.w3.org/WAI/tutorials/images/groups/ this should be pretty fine, i.e., the group role within figure should be valid HTML.

But the most popular validation extension, W3C Web Validator, reports it as invalid: A “figure” element with a “figcaption” descendant must not have a “role” attribute.

What’s wrong with the figure?

Read more here: Source link