Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds semantic HTML <time> elements to display date/time information in the node details component, improving accessibility and machine readability of temporal data.
Changes:
- Wraps date_commissioned and last_interview values with HTML
<time>elements - Adds datetime attributes to provide machine-readable timestamps
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <div slot="supporting-text"><span class="left">productName: </span>${this.node.productName}</div> | ||
| <div slot="supporting-text"> | ||
| <span class="left">Commissioned: </span>${this.node.date_commissioned} | ||
| <span class="left">Commissioned: </span><time datetime=${this.node.date_commissioned}>${this.node.date_commissioned}</time> |
There was a problem hiding this comment.
The datetime attribute value lacks timezone information. According to HTML5 specifications, datetime attributes should include timezone information for global date and time strings. Consider appending 'Z' to indicate UTC time (e.g., ${this.node.date_commissioned}Z) or using a local date-time format if the times are intended to be timezone-independent. Without timezone information, browsers and assistive technologies may interpret the time inconsistently.
There was a problem hiding this comment.
is it required that we convert the Date object to a formatted string in ws-controller already or could we move the formatting into node-details?
There was a problem hiding this comment.
Changing this in the response would break the websocket definions, right?
Maybe lets open a "cpllection ticket" for such updates because we plan an updated websocket format anyway soon. Then we can do this
| </div> | ||
| <div slot="supporting-text"> | ||
| <span class="left">Last interviewed: </span>${this.node.last_interview} | ||
| <span class="left">Last interviewed: </span><time datetime=${this.node.last_interview}>${this.node.last_interview}</time> |
There was a problem hiding this comment.
The datetime attribute value lacks timezone information. According to HTML5 specifications, datetime attributes should include timezone information for global date and time strings. Consider appending 'Z' to indicate UTC time (e.g., ${this.node.last_interview}Z) or using a local date-time format if the times are intended to be timezone-independent. Without timezone information, browsers and assistive technologies may interpret the time inconsistently.
311ae31 to
b8f7ec9
Compare
a bit of semantic