Skip to main content
HTML Validation

Bad value “” for attribute “aria-describedby” on element “div”: An IDREFS value must contain at least one non-whitespace character.

About This HTML Issue

Point aria-describedby on the div at the id of the element that holds the description, or remove it, because an empty or whitespace-only value is invalid.

The attribute takes an IDREFS value, a space-separated list of one or more id values. Screen readers announce the text of those elements as the description of the div, usually after its name and role. Hints and error messages are the typical content. A value of "" or " " gives them nothing to read. The validator shows the bad value between the quotes, so the same mistake appears as “” in one report and as spaces between the quotes in another.

This message usually comes with others. A UI component that accepts optional ARIA props often prints all of them on its wrapper div with an empty string as the default, and a single element ends up with id="", role="", aria-label="", aria-labelledby="" and aria-describedby="". Each empty attribute gets its own validator message. Fix the component once instead of every page that uses it. React and Vue leave out an attribute bound to null or undefined but print one bound to "", so pass null when there is no description ID.

aria-describedby is allowed on a plain div without a role (aria-labelledby isn't), so the validator accepts it as soon as the value holds a real ID. It only checks the format, not whether that ID exists on the page, so make sure the referenced element is there. Keep the attribute when the div is something users move into, such as a group of form controls. On a div that only wraps layout, screen readers often skip the description, so delete the attribute.

Invalid example

The shipping hint is on the page, but the empty aria-describedby doesn't point at it.

<div role="group" aria-labelledby="delivery-label" aria-describedby="">
  <p id="delivery-label">Delivery speed</p>
  <p>Orders placed before noon ship the same day.</p>
  <label><input type="radio" name="delivery" value="standard"> Standard</label>
  <label><input type="radio" name="delivery" value="express"> Express</label>
</div>

Valid example

The hint has an id and aria-describedby references it, so screen readers can read the hint when focus moves into the group.

<div role="group" aria-labelledby="delivery-label" aria-describedby="delivery-hint">
  <p id="delivery-label">Delivery speed</p>
  <p id="delivery-hint">Orders placed before noon ship the same day.</p>
  <label><input type="radio" name="delivery" value="standard"> Standard</label>
  <label><input type="radio" name="delivery" value="express"> Express</label>
</div>

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?
🌍 Trusted by teams worldwide

Validate at scale.
Ship accessible websites, faster.

Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.

Scheduled Reports
API Access
Open Source Standards
€5 / week

1K Weekly

1,000 monthly checks. Cancel anytime.

Get 1K Weekly →

Join teams across 40+ countries