# The “aria-label” attribute must not be specified on any “time” element unless the element has a “role” value other than “caption”, “code”, “deletion”, “emphasis”, “generic”, “insertion”, “paragraph”, “presentation”, “strong”, “subscript”, or “superscript”.

> Canonical HTML version: https://rocketvalidator.com/html-validation/the-aria-label-attribute-must-not-be-specified-on-any-time-element-unless-the-element-has-a-role-value-other-than-caption-code-deletion-emphasis-generic-insertion-paragraph-presentation-strong-subscript-or-superscript
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

The `<time>` element does not support the `aria-label` attribute when it has no explicit role or when it carries certain generic roles.

The `<time>` element has an implicit ARIA role of `time`, but this role is not listed among those that allow `aria-label`. According to the ARIA in HTML specification, `aria-label` is only permitted on elements with roles that support naming from author — and the default role of `<time>` (as well as roles like `generic`, `presentation`, `paragraph`, and others listed in the error) does not qualify.

In practice, the `<time>` element already conveys its meaning through its visible text content and the machine-readable `datetime` attribute. Screen readers use the visible text to announce the date, so `aria-label` is typically unnecessary.

To fix this, simply remove the `aria-label` attribute and ensure the visible text content is descriptive enough. If you need to provide a more accessible reading of the date, you can adjust the visible text itself or wrap the element with a `<span>` that has an appropriate role.

Also note the original code has a missing space before `datetime` — the attribute must be separated from `class="Tag"` by a space.

## HTML Examples

### ❌ Invalid: `aria-label` on `<time>`

```html
<time aria-label="Apr 2." class="Tag" datetime="2026-04-02">
  Apr 2.
</time>
```

### ✅ Fixed: Remove `aria-label` and use clear visible text

```html
<time class="Tag" datetime="2026-04-02">
  April 2, 2026
</time>
```

If you truly need `aria-label`, you can assign an explicit role that supports naming, such as `role="text"`, though this is rarely necessary:

```html
<time role="text" aria-label="April 2nd, 2026" class="Tag" datetime="2026-04-02">
  Apr 2.
</time>
```
