Merge pull request #145 from shoelace-style/fix-relative-time

fix relative time in screen readers
This commit is contained in:
Cory LaViska
2024-06-24 10:06:15 -04:00
committed by GitHub
2 changed files with 6 additions and 2 deletions

View File

@@ -12,7 +12,11 @@ Components with the <wa-badge variant="warning" pill>Experimental</wa-badge> bad
During the alpha period, things might break! We take breaking changes very seriously, but sometimes they're necessary to make the final product that much better. We appreciate your patience!
:::
## Web Awesome 1.0.0-alpha.1
## Next
- Fixed a bug where `<wa-relative-time>` would announce the full time instead of the relative time in screen readers [#22](https://github.com/shoelace-style/webawesome-alpha/issues/22)
## 1.0.0-alpha.1
- This is the initial release of Web Awesome alpha!

View File

@@ -109,7 +109,7 @@ export default class WaRelativeTime extends WebAwesomeElement {
this.updateTimeout = window.setTimeout(() => this.requestUpdate(), nextInterval);
}
return html` <time datetime=${this.isoTime} title=${this.titleTime}>${this.relativeTime}</time> `;
return html` <time datetime=${this.isoTime} title=${this.relativeTime}>${this.relativeTime}</time> `;
}
}