TSP Posted November 17, 2019 Posted November 17, 2019 I discovered something while investigating an issue. When a post with a quote is submitted to the database it stores it like this: <blockquote class="ipsQuote" data-gramm="false" data-ipsquote="" data-ipsquote-contentapp="forums" data-ipsquote-contentclass="forums_Topic" data-ipsquote-contentcommentid="25160025" data-ipsquote-contentid="1840499" data-ipsquote-contenttype="forums" data-ipsquote-timestamp="1573983633" data-ipsquote-userid="58981" data-ipsquote-username="TSP"> <div class="ipsQuote_citation"> TSP skrev (Akkurat nå): </div> <div class="ipsQuote_contents ipsClearfix" data-gramm="false"> <p> Kult! </p> </div> </blockquote> <p> Du er kul! </p>` Note what's within ipsQuote_citation. ("Akkurat nå" == "Just now") You store the relative time as it was in the users browser when they generated the quote. The string is for the same reason also stored according to their current language settings. On display in the community you fix this all up with Javascript by using the data-attributes. However, I would argue you should replace it on storage with a non-relative time, and also use the default language of the community for it. Changing this could provide a better experience for people with javascript disabled and developers utilizing the REST API.
bfarber Posted November 18, 2019 Posted November 18, 2019 We really only aim to make the site "work" if javascript is enabled. Beyond that....if you disable javascript, you should be used to the internet not working 100% as well as it does with javascript. 😛
CoffeeCake Posted December 3, 2019 Posted December 3, 2019 I think there's a difference between "working" in its reduced capacity state and storing and displaying relative data. This should be fixed as @TPS has kindly pointed out. What about search engine spiders? Screenreaders? I think we can have a higher standard than that.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.