W3C home > Mailing lists > Public > www-validator@w3.org > June 2019

"Possible misuse of aria-label" warning

From: Miller, Brian (ITS) <Brian.Miller@its.ny.gov>
Date: Thu, 20 Jun 2019 17:31:28 +0000
To: "www-validator@w3.org" <www-validator@w3.org>
Message-ID: <MN2PR09MB3582F2C27C922E45E2F82EBAB6E40@MN2PR09MB3582.namprd09.prod.outlook.com>

We're using figure elements (with role=group) to provide accessible content from infographics.

There are actually two sets of text for each infographic: a displayed caption, and fully descriptive text for the content in the infographic, that is not displayed but is available for screen readers).

It seemed prudent to apply different aria-labels to these two divs, but its getting a warning from the "nu" validator.

Here's the basic code:

  <figure role="group" aria-label="Tourism">
  <img src="tourism.jpg"  alt=" Tourism Infographic" class="slide-image">
      <div class="hideme" aria-label="Tourism content"><p></p></div>
      <div class="slide-text" aria-label="Tourism caption"><p>Tourism caption</p></div>

Is that really a misuse of aria-label? "aria-describedby" doesn't seem good, because in many cases the infographic content is best provided in tabular or list format.

Thanks for your time!



Brian J. Miller

Office of Information Technology Services
Revenue & Employment Portfolio, Enterprise Architecture and Shared Solutions
WA Harriman Campus, Building 8, Albany, NY 12227
(518) 451-8988 (desk) |  (518) 322-6476 (mobile)
Received on Friday, 21 June 2019 06:53:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:00:09 UTC