Template talk:Val/Archive 7

Template-protected edit request on 9 Sep 2022
Can we add the Jansky? Abbreviation Jy, probably in the astrophysics section. At the moment using Ju as a unit, for example in the val template, links to the dab page Jy. Lithopsian (talk) 19:25, 9 September 2022 (UTC)
 * ✅ – "...flux density of $42 Jy$".  P.I. Ellsworth &thinsp;, ed.  put'r there 20:34, 9 September 2022 (UTC)
 * Thanks. Unit Jy is now linking correctly to Jansky.  Lithopsian (talk) 20:36, 9 September 2022 (UTC)
 * my pleasure!  Paine  20:39, 9 September 2022 (UTC)

para: no line breaks
The table in the doc sets a width on the columns to prevent line breaks in the parameter descriptions. This is a work-around and not a solution. I've asked for this to be fixed in para by making that template output html/css to prevent line breaks. — SkyLined (talk) 14:15, 3 April 2023 (UTC)

Horizontal spacing
Normally in expressions like 5 ± 3 the space to the left and right of "±" is what is appropriate to binary operation symbols, not, for example, written as 5±3. And when a plus sign or a minus sign is used as a unary operation symbol, there is less space, as in +5 or −5, and so it should be also with "±".

When this template is used it looks to me as if a larger space appears to the left of this symbol than to the right. Can that be fixed? Michael Hardy (talk) 20:17, 9 July 2023 (UTC)
 * The history is that val used to be based on template wikitext which was replaced with Module:Val. The old Val/± (now deleted) was edited on 12 May 2015 to provide left and right margins of 0.3em and 0.15em around ± (before that, there was no margin). The module emulates what the template did. That is, val has worked like this since May 2015. There are two cases where unequal spacing happens:
 * I can see that someone used to binary operators would want equal spacing on both sides but I think an argument could be made that the ±3 is a modifier of the 5 so the current spacing is appropriate. Some examples can be seen in the infobox at Gamma Canis Minoris which includes Rotational velocity $5$ km/s. Astronomical unit has more examples, including exponents and the best IAU 2009 estimate was A = c0τA = $5$. We would need a pretty solid discussion and agreement to change val now. Johnuniq (talk) 04:39, 10 July 2023 (UTC)
 * Ideally, we should be following a standard set by an authorative body. Failing that, we should reach consensus on what to do based on the most common way it is done outside Wikipedia. I have no data on this either way, so I cannot help. If we cannot find any data on which to base this decision, a vote will have to do.
 * — SkyLined (talk) 07:25, 10 July 2023 (UTC)
 * Ideally, we should be following a standard set by an authorative body. Failing that, we should reach consensus on what to do based on the most common way it is done outside Wikipedia. I have no data on this either way, so I cannot help. If we cannot find any data on which to base this decision, a vote will have to do.
 * — SkyLined (talk) 07:25, 10 July 2023 (UTC)
 * — SkyLined (talk) 07:25, 10 July 2023 (UTC)

Template-protected edit request on 16 December 2023
The unit "dex" links to decimal exponent, which redirects to a page that doesn't use that term, nor "dex". It would be better to link to dex (decimal exponent). That doesn't actually exist, but it gives a message saying that one can look at the entry in Wiktionary, which does define it. Eric Kvaalen (talk) 15:53, 16 December 2023 (UTC)


 * I'm more inclined to remove the link altogether, but I'm sure that would break something. I'd be on board with linking to a soft redirect if any of the other links are to soft redirects. SWinxy (talk) 19:15, 16 December 2023 (UTC)
 * The unit dex was added on 14 May 2021 by in diff. It was used at HD 203949 in diff. I have removed dex from Module:Val/units and replaced where it was used with wikitext that links to dex (decimal exponent). I think that is the best that can be done at the moment. In general, a discussion like this should be just a discussion. Use an edit request after there is some agreement about what should happen. Johnuniq (talk) 02:30, 17 December 2023 (UTC)

Screen reader problems with digits grouped by spaces in this template
I can't figure out precisely what's causing the problem here, but in my primary browser Chrome (but not in Firefox), $5,000$ now reads with my screen reader JAWS as "one hundred twenty three four hundred fifty six ..." instead of as "123 thousand four hundred ..." and so on, because it thinks there's a space between the digits. I'm pretty sure this was working fine in 2014 when I last brought this up. Gaps still works fine and the val template reads out properly with the other Windos screen reader, NVDA. I tried older JAWS versions back to 2020 and they still had this problem (though this isn't 100% reliable as they have shared components). Graham87 (talk) 09:12, 1 October 2023 (UTC)
 * Huh? It's working fine here but not in the template documentation. This problem's getting weirder and weirder ... Graham87 (talk) 09:14, 1 October 2023 (UTC)
 * OK it's not a val/gaps problem but an issue with whether an instance of this template is inside an ordered or unordered HTML list, per testing I've done at User:Graham87/sandbox25. Feel free to edit that page to add more test cases for me to respond to. But don't add $5,000$ of them ... hmmm, the val template reads correctly with my screen reader with definition/description lists! (Also, I didn't start using Chrome until 2020 so I wouldn't have previously noticed this problem). Graham87 (talk) 09:29, 1 October 2023 (UTC)
 * JAWS does insert random spaces in Chrome in other situations and it's apparently a fairly long-standing problem. This is the first time I've noticed it do so in a situation where people have gone out of their way to get screen readers to not display spaces! Graham87 (talk) 10:01, 1 October 2023 (UTC)
 * I tried the examples at User:Graham87/sandbox25 in Special:ExpandTemplates and also looked at the HTML source for sandbox25. In both cases the expected result occurs, namely the wikitext and HTML generated by gaps is identical in the three places it is used. The only difference being that the gaps HTML is in  or   when in a list. I guess there's nothing we can do about the problem unless some workaround turns up, for example a tag that would cause JAWS in Chrome to know it was a single number. It might be worth asking at WP:VPT. Johnuniq (talk) 01:59, 2 October 2023 (UTC)
 * I'd be very surprised if there was a tag like that ... and screen readers tend to not be good with such tags anyway. I think it's just a JAWS/Chrome bug. I might report it to Freedom Scientific, the company that makes JAWS, but given how long-standing the problem is I don't expect much traction. Graham87 (talk) 10:19, 2 October 2023 (UTC)
 * And it also affects bold/italic markup (which I've added to my sandbox ... I'd noticed this sort of thing before but I'd never really isolated the problem properly until now). Graham87 (talk) 11:30, 2 October 2023 (UTC)
 * I've mentioned this discussion at Wikipedia talk:WikiProject Accessibility, just as an FYI. Graham87 (talk) 11:42, 2 October 2023 (UTC)
 * I reported it and ... they fixed it in the very latest version (released last night my time), JAWS 2024.2312.53; all the items in my sandbox read out properly now! Their latest "what's new" page (archived because it's dynamic) has an item that says: "Resolved an issue where JAWS was inserting an extra space in the virtual buffer when encountering the closing tag for certain HTML elements." Graham87 (talk) 03:52, 21 December 2023 (UTC)