WAI-ARIA: Role=Time
An element that represents a specific point in time.
Description
An element that represents a specific point in time.
NOTE: At the present time, there are no WAI-ARIA properties corresponding to the datetime
attribute supported on <time>
in [HTML]. The addition of this property will be considered for ARIA version 1.3.
Authors SHOULD limit text contents to a valid date- or time-related string, or apply this future datetime
-equivalent property to the element which has role time
.
Examples of valid date- or time-related strings as text contents of an element with the time
role:
- A valid month string:
2019-11
- A valid date string:
2019-11-18
- A valid yearless date string:
11-18
- A valid time string:
09:54:39
- A valid floating date and time string:
2019-11-18T14:54
- A valid time-zone offset string:
-08:00
- A valid global date and time string:
2019-11-18T14:54Z
- A valid week string:
2019-W47
- Four or more ASCII digits, at least one of which is not U+0030 DIGIT ZERO (0):
0001
- A valid duration string:
4h 18m 3s
Characteristics
Superclass Role
Related Concepts
<time>
in [HTML]
Inherited States and Properties
- aria-atomic
- aria-busy (state)
- aria-controls
- aria-current (state)
- aria-describedby
- aria-details
- aria-disabled (state)
- aria-dropeffect
- aria-errormessage
- aria-flowto
- aria-grabbed (state)
- aria-haspopup
- aria-hidden (state)
- aria-invalid (state)
- aria-keyshortcuts
- aria-label
- aria-labelledby
- aria-live
- aria-owns
- aria-relevant
- aria-roledescription
Semantic HTML
The HTML alternative for role=”time” is the <time>
tag.
Reference
- WAI-ARIA 1.2 Specification
Refer to the notes from the WAI-ARIA 1.2 specification for more information on role=time.