Skip to content

Instantly share code, notes, and snippets.

@jashaj
Created May 9, 2019 15:45
Show Gist options
  • Select an option

  • Save jashaj/51b52fa5f2cbf10eca930e798c47eb3b to your computer and use it in GitHub Desktop.

Select an option

Save jashaj/51b52fa5f2cbf10eca930e798c47eb3b to your computer and use it in GitHub Desktop.
Page with the time element to test with screenreaders like VoiceOver
<!doctype html>
<html lang="en" xml:lang="en">
<head>
<meta charset="UTF-8" />
<title>Time will tell</title>
</head>
<body>
<h1>Examples of the time element</h1>
<p>Below several examples of the time element to check how VoiceOver will read them out loud.</p>
<section>
<h2>Dates</h2>
<h3>Date as year-month number-day</h3>
<p>Today is <time datetime="2019-04-19">2019-04-19</time></p>
<p>Today is <time>2019-04-19</time></p>
<p>Today is <span>2019-04-19</span></p>
<h3>Date as month day</h3>
<p>Today is <time datetime="04-19">April 19</time></p>
<p>Today is <time>April 19</time></p>
<p>Today is <span>April 19</span></p>
</section>
<section>
<h2>Durations</h2>
<h3>Abbreviated time period</h3>
<p>It takes <time datetime="PT47M">47m</time> to travel to The Hague</p>
<p>It takes <time>47m</time> to travel to The Hague</p>
<p>It takes <span>47m</span> to travel to The Hague</p>
<h3>Time period written out</h3>
<p>It takes <time datetime="PT47M">47 minutes</time> to travel to The Hague</p>
<p>It takes <time>47 minutes</time> to travel to The Hague</p>
<p>It takes <span>47 minutes</span> to travel to The Hague</p>
</section>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment