Help talk:Table
Daily pageviews of Help:Table
A graph should have been displayed here but graphs are temporarily disabled. Until they are enabled again, visit the interactive graph at pageviews.wmcloud.org |
This is the talk page for discussing improvements to the Table page. |
|
Archives: 1, 2, 3, 4, 5, 6, 7, 8, 9Auto-archiving period: 180 days |
This is the talk page for discussing improvements to the Table page. |
|
Archives: 1, 2, 3, 4, 5, 6, 7, 8, 9Auto-archiving period: 180 days |
Wikipedia Help NA‑class Mid‑importance | ||||||||||
|
The contentious topics procedure applies to this page. This page is related to the English Wikipedia Manual of Style and article titles policy, which has been designated as a contentious topic. Editors who repeatedly or seriously fail to adhere to the purpose of Wikipedia, any expected standards of behaviour, or any normal editorial process may be blocked or restricted by an administrator. Editors are advised to familiarise themselves with the contentious topics procedures before editing this page. |
Multiple Column Table
I have been working on converting bare lists of aircraft on aircraft manufacturer articles to formatted tables. (e.g. before and after) This generally improves the article, but unfortunately the one problem I have been running into is that the table ends up creating a bunch of empty white space on the right side of the article on non-mobile versions. Is there a way to wrap the table into two or more columns so that there is not a waste of space? Essentially, I am thinking of some version of the div col template for tables that doesn't break the formatting. Ideally, it could stretch the title/caption across all the columns, but repeat the headers. For what it's worth, my problem is much the same as the one mentioned in the section above. –Noha307 (talk) 22:40, 25 March 2020 (UTC)
- I'm pretty sure that a snaking table of the kind you imagine is not possible. The kind of table you show in your example is IMO perfectly acceptable (althought I don't see the need to reduce the font size or to bolden the names). -- Michael Bednarek (talk) 07:14, 26 March 2020 (UTC)
- @Noha307 and Michael Bednarek: I was able to get this to work using a little bit of javascript. I'm also fairly certain there's a clever way to do this using only css, but I don't have the time to puzzle through this right now. You can see what I came up with here. I've also included the code below.
Javascript for snaking table
|
---|
var someDiv = document.getElementById("cont"); var someTable = document.getElementById("tbl"); var addedTable = document.createElement("table"); someDiv.appendChild(addedTable); addedTable.setAttribute("id", "addedTable"); addedTable.innerHTML = someTable.innerHTML; var rows = someTable.getElementsByTagName("tr"); var rowsCopy = addedTable.getElementsByTagName("tr"); for(var i=1;i<rows.length;i++) //needs to be 1 instead of 0 to account for headers { if(i>(rows.length/2)) { rows[i].style.display = "none"; }else { rowsCopy[i].style.display = "none"; } } |
- I'm not familiar with the procedure for requesting page specific JS, it may be best to consult a recently active sysop or inquire at the help desk on that matter. Other then that I'm going to try to drop back by at least once before the 3rd so if you have further questions I can probably get back to you by then. (please ping on reply)𝒬𝔔 23:48, 28 June 2020 (UTC)
- I'm pretty sure that users cannot insert JavaScript into any Wikipedia pages. -- Michael Bednarek (talk) 01:28, 29 June 2020 (UTC)
- There is no feature to add JavaScript to a single page. JavaScript for all pages can be added to MediaWiki:Common.js by interface administrators. It could test the page name and behave differently but I don't see support for that except for Main Page. Defining a general feature which could be invoked by code on a page is more realistic. PrimeHunter (talk) 08:59, 29 June 2020 (UTC)
- I'm pretty sure that users cannot insert JavaScript into any Wikipedia pages. -- Michael Bednarek (talk) 01:28, 29 June 2020 (UTC)
- I'm not familiar with the procedure for requesting page specific JS, it may be best to consult a recently active sysop or inquire at the help desk on that matter. Other then that I'm going to try to drop back by at least once before the 3rd so if you have further questions I can probably get back to you by then. (please ping on reply)𝒬𝔔 23:48, 28 June 2020 (UTC)
- Users can add JavaScript (and CSS) to their own account to change the display of all articles for just themselves but not directly into individual articles - that would be a dangerous security issue. The original bare list had a {{Div col}} template which added CSS to adjust the number of columns depending on the available space. Switching to a table makes sense as you are adding extra information, but the only way to re-flow like the original list would be to cut the table into several small tables and use the same {{Div col}} template to shuffle them around. All technically possible, but adds a crazy overhead and loses the ability to sort the full list. In short: You are stuck with a tall thin table. — GhostInTheMachine talk to me 09:28, 29 June 2020 (UTC)
- Pinging discussion participants (Michael Bednarek—PrimeHunter—GhostInTheMachine) Thanks for the responses; it's a little odd that sysops can modify JavaScript for all pages but not an individual page although I can't say I'm surprised either. Thus it appears there are two potential ways forward.One is to get this done using css only since page specific css doesn't seem to be an issue (thinking of Template:COVID-19 pandemic data/styles.css mentioned in another section but I'm not familiar with the procedure for gaining the necessary approvals). If I'm feeling ambitious and have some extra free time I might take a crack at it, but I'm sure there's some css gurus hanging around that could get it done in a hurry.The other option is to request modification of the sitewide js and css pages to enable this as an option; the effect could then be targeted at just certain new classes (or class combinations) created for this purpose. This would have the advantage of enabling this option for any table, as any user could just add the appropriate class(es). The disadvantage is that it would require a lengthy discussion on those talk pages, and there would be a valid objection on the grounds that it's undesirable to make changes to sitewide js that would only be applied to a handful of pages.𝒬𝔔 18:16, 7 July 2020 (UTC)
Transpose tables
I cannot find anything about transposing (swap columns and rows). Is this even possible?--89.206.112.10 (talk) 18:47, 6 April 2020 (UTC)
- See the last part of Help:Table. The section called "Tables and the Visual Editor". You can paste in new columns and rows. Then delete old columns and rows. You can also paste over existing columns and rows. --Timeshifter (talk) 09:37, 7 April 2020 (UTC)
- I don't see the option for turning columns into rows or vice versa. I only manage to shift rows or columns around. But I try to turn e.g.
Header 1 Header 2 Header 3 row 1 cell 1 row 1 cell 2 row 1 cell 3 row 2 cell 1 row 2 cell 2 row 2 cell 3
- into
Header 1 row 1 cell 1 row 2 cell 1 Header 2 row 1 cell 2 row 2 cell 2 Header 3 row 1 cell 3 row 2 cell 3
- while not losing any references. Appreciate your help.--89.206.112.13 (talk) 08:08, 8 April 2020 (UTC)
- I am not seeing anything in Mediawiki. Maybe others know of some tools within the Mediawiki world.
- It can be done with freeware LibreOffice Calc. A free spreadsheet program. See:
- https://www.google.com/search?q=libreoffice+calc++turning+columns+into+rows+or+vice+versa
- --Timeshifter (talk) 17:16, 11 April 2020 (UTC)
- Thaught as much. Unfortunately, I'm unable to export Wiki references into LibreOffice Calc. Thank you anyway.--89.206.112.11 (talk) 09:29, 15 April 2020 (UTC)
- @89.206.112.11 Apologies if this is stale, I know IPs frequently change (and can't be pinged anyway) but just in case you drop back by; with jQuery transposition is fairly straightforward using table.Transpose.js see this for more details.𝒬𝔔 23:48, 28 June 2020 (UTC)
Sticky table headers?
Is there a way to make the first row of a table (the header) sticky? So that it stays on screen no matter which part of the table is on screen? Otherwise reading long (and wide) tables is really hard.
--Xerces8 (talk) 14:57, 11 April 2020 (UTC)
- Google pulls up some Mediawiki info on it:
- https://www.google.com/search?q=mediawiki+Sticky+table+headers
- --Timeshifter (talk) 17:22, 11 April 2020 (UTC)
- @Xerces8: See also: Phabricator request for floating table headers. --Timeshifter (talk) 08:51, 14 April 2020 (UTC)
- @Xerces8 and Timeshifter: I just came here to request the same thing, following my post at Wikipedia_talk:Reliable_sources/Perennial_sources#Technical_idea:_make_the_header_row_of_the_table_sticky. This would be hugely useful for pages like that one. Someone seems to have figured out how to do it at Template:2019–20 coronavirus pandemic data, but that may have involved Herculean amounts of coding (I see they've defined their own custom CSS class, I think). Does anyone have the technical expertise to solve this and add some instructions to this help page, or should we go to WP:VPT? {{u|Sdkb}} talk 00:28, 22 April 2020 (UTC)
- RS talk item was archived to Wikipedia_talk:Reliable_sources/Perennial_sources/Archive_3#Technical_idea:_make_the_header_row_of_the_table_sticky — GhostInTheMachine talk to me 10:45, 6 September 2020 (UTC)
- Maybe ask at Template talk:2019–20 coronavirus pandemic data. --Timeshifter (talk) 00:37, 22 April 2020 (UTC)
- Take a look in Template:2019–20 coronavirus pandemic data/styles.css at .covid-sticky bits. Graeme Bartlett (talk) 12:17, 22 April 2020 (UTC)
- Maybe Bawolff can help. --MarioGom (talk) 12:54, 22 April 2020 (UTC)
- Generally this stuff isn't mediawiki specific, but works the same as on other websites. See https://developer.mozilla.org/en-US/docs/Web/CSS/position#Sticky_positioning for details on how position:sticky. That said, I'm not sure how to do sticky headers in a table that's not scrollable (using only css and no js). The Covid template works since the entire thing is in a scrollbox. I'm not fully up to date on recent CSS stuff, so maybe there's a method I am unaware of. Bawolff (talk) 01:11, 3 May 2020 (UTC)
- @Xerces8 and Timeshifter: I just came here to request the same thing, following my post at Wikipedia_talk:Reliable_sources/Perennial_sources#Technical_idea:_make_the_header_row_of_the_table_sticky. This would be hugely useful for pages like that one. Someone seems to have figured out how to do it at Template:2019–20 coronavirus pandemic data, but that may have involved Herculean amounts of coding (I see they've defined their own custom CSS class, I think). Does anyone have the technical expertise to solve this and add some instructions to this help page, or should we go to WP:VPT? {{u|Sdkb}} talk 00:28, 22 April 2020 (UTC)
- @Xerces8: See also: Phabricator request for floating table headers. --Timeshifter (talk) 08:51, 14 April 2020 (UTC)
- User preferences includes a test gadget created by TheDJ
Make sure that headers of tables remain in view as long as the table is in view (requires Firefox v59 or Safari)
. See MediaWiki:Gadget-StickyTableHeaders.js and MediaWiki:Gadget-StickyTableHeaders.css. - Wikipedia:Village_pump_(technical)/Archive_154#Table_header_view from February 2018
- Wikipedia:Village_pump_(technical)/Archive_170#Sticky_table_headers from November 2018.
- See {{COVID-19 pandemic data}} and the CSS in {{COVID-19 pandemic data/styles.css}} for the current "best" version. — GhostInTheMachine talk to me 10:45, 6 September 2020 (UTC)
Rowspan in wikitable sortable plainrowheaders not spanning
What have I done wrong here? The table fields for year/artist/album collapse in a way that doesn't seem to happen when I've used this table elsewhere. --Prosperosity (talk) 23:48, 5 May 2020 (UTC)
- I have seen problems before when a whole column has header cells in a sortable table. It works to end with a non-header cell, e.g. in a non-displayed row [1]:
|- | style="display:none;" colspan="4" | <!-- Hidden row without a header cell to avoid sortable fail -->
- PrimeHunter (talk) 02:08, 6 May 2020 (UTC)
- Awesome, thank you! --Prosperosity (talk) 03:39, 6 May 2020 (UTC)
empty rows?
Under Help:Table#Setting_borders, in the second example, the wikitext includes
|- |- style="text-align: center;"
The first of those lines would seem to denote an empty row (no cells), but the accompanying prose doesn't say anything about it, and the generated HTML doesn't have an extra, empty tr element. So is it just a sort of 'spacer' in the source? Jmdyck (talk) 02:01, 20 May 2020 (UTC)
- I think it was just a typo. I removed it. The table looks the same with and without it.
- With:
Left | Center | Right |
---|---|---|
Bronze star | Gold star | Green star |
- Without:
Left | Center | Right |
---|---|---|
Bronze star | Gold star | Green star |
- --Timeshifter (talk) 09:08, 20 May 2020 (UTC)
It the captions section it says "Wikipedia Manual of Style considers them a high priority for accessibility reasons" but when an editor uses the button on source editor to insert a table, there is no caption by default, and it's not even one of the checkbox options, they need to know to type in a "|+" line manually. Can the caption line be added to this, and checked by default or non-optional, please. Irtapil (talk) 13:06, 9 June 2020 (UTC)
- @Irtapil: I'm fairly certain that this should be moved to Village pump for wider discussion. Pinging PrimeHunter for input however (picking on you because I noticed you're active on phabricator), in case something similar is already tracked and/or has been previously discussed and rejected.𝒬𝔔 23:48, 28 June 2020 (UTC)
Banding.
Dear Editors. Could you possibly help with how to set the banding for tables: i.e. should every 2nd line be red? (If I set the color line by line, I have to rewrite the rows one by one when expanding the table, so that there are no red rows next to each other, for example. There is such a function in Excel, I would like something like this: [2]) 12akd (talk) 05:52, 10 June 2020 (UTC)
class="mw-datatable"
allows for row highlighting. When a cursor hovers over the table, that row over which the cursor is on will be highlighted. This makes it easier to follow the data and info across a row, especially in wider tables.
- See the section in Help:Table with mw-datatable in the section title. See an example here:
- List of countries by incarceration rate. --Timeshifter (talk) 11:08, 10 June 2020 (UTC)
@Timeshifter: Thank you very much for your help! I wish you more good work! 12akd (talk) 12:38, 10 June 2020 (UTC)
- There is an old discussion at MediaWiki talk:Common.css/Archive 15#New style for tables with alternating row colors but no action was taken to add the feature. PrimeHunter (talk) 16:31, 10 June 2020 (UTC)
- It was added but quickly reverted in 2015 with discussion at MediaWiki talk:Common.css/Archive 16#Harej's edit. PrimeHunter (talk) 16:40, 10 June 2020 (UTC)
It is only good for fairly short tables, but take a look at the {{Alternating rows table section}} template. — GhostInTheMachine talk to me 17:45, 10 June 2020 (UTC)
@PrimeHunter:, @GhostInTheMachine: I apologize for the late reply, but I haven’t looked at this page lately. I can’t fully follow the complicated discussions on the links above - but I think the last solution “Alternating rows table section” will be appropriate. In fact, banding is a widespread practice outside of Wikipedia that makes it easier to distinguish individual lines. I would use it in this table (so that you don't always have to color the rows one by one): https://hu.wikipedia.org/wiki/Magyar_lexikonok_list%C3%A1ja 12akd (talk) 04:05, 25 June 2020 (UTC)
- @12akd: Always say if a post is about another wiki. If hu:MediaWiki:Common.css adds
.litetable tr:nth-child(even){
background: #F0E68C;
}
- then you can color alternating rows with
class="litetable"
. It would be a sitewide feature with a fixed color. Similar code [3] was rejected here. The suggested color#f7f8ff
was similar to the default background color in the wikitable class so it wouldn't have worked for them. PrimeHunter (talk) 07:55, 25 June 2020 (UTC)
@PrimeHunter: Thanks for the feedback. Yes, it should be something (at least 1 variety) that 2 similar colors alternate. (Maybe they'll do it one day.) 12akd (talk) 08:02, 25 June 2020 (UTC)
- The {{Alternating rows table section}} template has been updated and now has no row limit. — GhostInTheMachine talk to me 14:23, 5 July 2020 (UTC)
Hi all,
I recently edited this table to include rowspans but I must have broken something in the code as it no longer sorts. I've tried what I thought of as obvious fixes but nothing so far has worked.
I also edited List of top international men's football goal scorers by country#Other countries' players and that doesn't have the same problem otherwise I'd just chalk it up to a rowspan error. Does anyone know (a) what I've done wrong and (b) how to fix it!?
Many thanks
Felixsv7 (talk) 15:22, 21 July 2020 (UTC)
- @Felixsv7: It was a rowspan error. At least in Firefox, the error was easy to spot since part of the bottom edge of the table was missing. -- John of Reading (talk) 15:49, 21 July 2020 (UTC)
- @John of Reading: You hero. Thank you very much Felixsv7 (talk) 16:10, 21 July 2020 (UTC)
Centering of collapsible tables
With the centering style suggested in this article it seems to center the beginning of the text, instead of the middle, for collapsed tables of the wikitable mw-collapsible class. https://en.wikipedia.org/wiki/Hormone_replacement_therapy displays this issue quite well. What would be the appropriator styling for such collapsible tables? 8ya (talk) 05:15, 24 July 2020 (UTC)
- 8ya, try removing this from the template:
style="margin: 1em auto;"
- Then see how it transcludes. - In my preview it gets rid of the centering of the table. It is generally a bad idea to center tables. The wider the screen, the more of a problem it is. People scroll downwards a lot easier than horizontally. I am talking about the natural scanning of the eyes down a page. This is interrupted by tables farther to the right. --Timeshifter (talk) 18:10, 24 July 2020 (UTC)
- Timeshifter, thanks for the reply. I wouldn't mind getting rid of the centering for them, but just in case it's ever needed somewhere else, how would one go about centering them properly?
- 8ya (talk) 23:49, 24 July 2020 (UTC)
- See: Help:Table#Centering tables
- I am not sure if the centering will work after transclusion. You will have to test that. Here is more info via a Google search:
- https://www.google.com/search?q=css+for+table+centering
- --Timeshifter (talk) 20:19, 25 July 2020 (UTC)
Scope
The scope attributes for header cells are not optional on Wikipedia. By explicitly marking a cell as a header with a scope of either row or column, it helps ensure that as many screen readers as possible will correctly identify the header cell. There is a good example at H63: Using the scope attribute to associate header cells and data cells in data tables] which shows how the technique helps particularly in cases where the natural row header is not in the first column.
When the guidance in MOS:DTT was written, there were significant variations in how screen readers handled table headers and a useful survey can be read here:
Although today the latest models of screen reader have much improved functionality and are generally more consistent among themselves, using scope is still a sensible markup because the cost of screen readers like JAWS means that many users still have older versions. We still have consistent advice across the web to use scope for the benefit of screen readers:
- Web Accessibility Tutorials - Guidance on how to create websites that meet WCAG - Tables Concepts
- Accessible Tables (University of Washington)
- Mozilla's Handling common accessibility problems and the example source code
- Accessibility Handbook (O’Reilly)
The advice here is obliged to accurately reflect the guidance in MoS, not present an idiosyncratic alternate view. --RexxS (talk) 15:44, 13 August 2020 (UTC)
Web Content Accessibility Guidelines and scope
Web Content Accessibility Guidelines. An editor, User:RexxS keeps deleting info from Web Content Accessibility Guidelines concerning scope. And also info from an admin who uses a screen reader. See diffs: [4] and [5]'
Here is the version of the article with that info.
RexxS links to Wikipedia:Manual of Style/Accessibility/Data tables tutorial which is neither a guideline, nor a policy, according to the banner at the top.
Here is the section that RexxS keeps deleting:
The same admin in an August 2020 discussion about the same set of tables, but where the row headers were changed to data cells: "There are no problems with those tables, and having the row headers replaced with data cells makes no difference." See: H63: Using the scope attribute to associate header cells and data cells in data tables | Techniques for WCAG 2.0. It is from the Web Content Accessibility Guidelines of the World Wide Web Consortium (W3C). It states: "For simple tables that have the headers in the first row or column then it is sufficient to simply use the TH elements without scope." So the scope markup is not needed in simple wikitables using |
RexxS wrote the remaining part of that scope section. --Timeshifter (talk) 16:15, 13 August 2020 (UTC)
- @Timeshifter: See above. --RexxS (talk) 21:56, 13 August 2020 (UTC)
- Graham87 (who uses a screen reader) said today (at Wikipedia talk:Manual of Style/Accessibility/Data tables tutorial) that he did not see a problem with the simple tables without scope tags or row headers in the latest table comparisons I created. In comparison to the same tables with scope tags and row headers. See:
- User:Timeshifter/Sandbox112.
- User:Timeshifter/Sandbox113.
- RexxS. People are going to continue to ignore your pleas for scope tags and row headers until you show them the complex tables that actually need them. I am trying to figure out which complex tables need those scope tags and row headers.
- You can leave dire admonitions in Help:Table that editors must use scope tags and row headers. Volunteer editors will continue to ignore it because they don't see the need, and because of the time involved.
- Also, on a related topic there are thousands of tables on Wikipedia that need data cell text aligned to the right, and 1st column text aligned to the left. Editors are not going to do a lot of work to add scope=row to each cell in a header column just to be able to use class=plainrowheaders on simple tables. For those tables without scope tags there needs to be another way. Such as
class=left-align-first-column
andclass=left-align-2nd-column
- (when a rank column is the first column). - See discussions about the new table classes:
- MediaWiki talk:Common.css#CSS to left align the text in the first column of a table
- Wikipedia:Village pump (technical)#class="wikitable aligned linked" for linked country lists with flags
- RexxS. You shouldn't be trying to block these new classes in a futile effort to get volunteer editors to go back and add scope tags and rowheaders to tens of thousands of tables. In order to be able to use class=plainrowheaders.
- Also, screen readers are a lot better than before according to the Wikipedia article on them. There are free and open source screen readers listed there too. One of them, NVDA, became the most popular screenreader in use throughout the world according to its Wikipedia article.
- Concerning User:Timeshifter/Sandbox103 Graham87 wrote: "FWIW all those tables read identically to me on the latest version of JAWS and a fairly recent version of NVDA."
- I want to emphasize that I am not against the use of scope tags and rowheaders. I only want to emphasize their use where they are needed most. If others want to also add them to every simple table on Wikipedia that is up to them. --Timeshifter (talk) 11:28, 14 August 2020 (UTC)
- Yes, NVDA is fairly competitive now with its commercial cousin, JAWS, and people who can't afford JAWS can/will switch to NVDA. But there are reasons why screen reader users might want to use an earlier version of NVDA, such as a recent update that broke all add-ons, and not for the first time either ... to be fair the more frequently used add-ons get updated fairly quickly. I don't use NVDA because I'm extremely comfortable with my highly customised settings in JAWS and don't feel any need to switch ... that's an extremely weird position to take in certain parts of the blind community. Anyway, there are also mobile screen readers ... I know very little about those. I'd rather too many scope tags be used than too few ... and that the Manual of Style contain broadly applicable instructions rather than complex ones which are hard to follow ... Graham87 12:29, 14 August 2020 (UTC)
- @Timeshifter: Are you suffering from WP:IDIDNTHEARTHAT?
- The point has never been whether some wiki-tables will be read accurately by a screen reader whether or not they are properly marked up with headers and scopes.
- The point is that all wiki-tables will be read accurately by a screen reader when they are properly marked up with headers and scopes.
- We therefore give the most straightforward advice: to mark up all tables with headers and scopes.
- Nobody is going to ignore the MOS when it's pointed out to them, except you. Please review WP:DE and start to address the actual issues.
- If you're having problems adding scope to row headers, learn how to use find and replace with regular expressions, or ask somebody to do the job for you.
- You've been told that your new class won't be added to common.css because (1) it's not needed; and (2) you've not supplied an actual case where it would be useful.
- How many times do you need to hear the same facts before you start to understand? The guidance in the MoS has community consensus and you haven't supplied any good reasons to change it just to fit in with your crusade to add unneeded classes to common.css. If you want me to show you how to use WP:TemplateStyles, just ask and I'll be glad to help you. --RexxS (talk) 15:53, 14 August 2020 (UTC)
- You seem to be outnumbered in the discussions about the new class proposal. And you seem determined to hijack those threads in your crusade to have scope tags added to all tables. I am not stopping you from adding scope tags to all tables. Knock yourself out.
- Rexxs. You wrote: "Nobody is going to ignore the MOS when it's pointed out to them, except you." It's been ignored now even though info on scope tags has been in Help:Table for a long time. I only added the WCAG info on May 5, 2020. I don't remember editing scope info before that. Here is the version before I consolidated the scope info to one section, and added the WCAG info.
- Feel free to put back only your MOS info in Help:Table, with even bolder admonitions and dire warnings. Don't add the info from WCAG that I found that directly contradicts what you say. See how far it gets you. Most tables will remain without scope tags, because you haven't convinced volunteer editors, nor WCAG, of the need to do so. Adding scope tags is extra work. There are many table features that are recommended that table editors should do. And they don't get done. I have been editing Help:Table and Help:Sorting for a long time. I have reason to believe what I am saying. --Timeshifter (talk) 16:25, 14 August 2020 (UTC)
- Your new class doesn't belong in Common.css and the sooner you realise that, the sooner you'll be able to move on and accept the advice you've been given. If you think that an editor has ignored the MoS after it's been pointed out to them, let's see the diff, otherwise you're just trolling.
- Even though Help:Table isn't linked from any WP:PAG page, it still needs to accurately reflect the policies and guidelines that it offers advice on. I'm afraid that your present advice is simply terrible, as it risks confusion by adding a layer of complexity onto guidance that needs to be as simple as possible. If you think you can genuinely improve the advice in the page, please do so. I've just updated the sections on Using the toolbar and Basic table markup summary as captions are required for all data tables.
- Nothing that the WCAG recommends directly contradicts the advice in the MoS. H.63 actually gives just one example on that page and it uses scope. Is that a simple table or not? If not, why does WCAG call it "A simple schedule"?
- If you have headers/scopes where you don't need them, the tables are read properly by all screen readers. If you don't have headers/scopes where you do need them, the tables are not read properly by all screen readers. What's easier: mark up all tables in the same way? or ask editors to work out which tables can manage without scopes/headers?
- You write "
Adding scope tags is extra work
". Yes it is. Adding captions is extra work. Marking up lists as lists is extra work. Observing MOS:LISTGAP is extra work (at least for you). Improving accessibility is extra work, and if you're unwilling to do that extra work, you need to keep away from accessibility issues. Fortunately, most editors are willing to do a little extra work if it means we ensure accessibility gains across the encyclopedia. --RexxS (talk) 21:35, 14 August 2020 (UTC)
- @Timeshifter: Are you suffering from WP:IDIDNTHEARTHAT?
- Yes, NVDA is fairly competitive now with its commercial cousin, JAWS, and people who can't afford JAWS can/will switch to NVDA. But there are reasons why screen reader users might want to use an earlier version of NVDA, such as a recent update that broke all add-ons, and not for the first time either ... to be fair the more frequently used add-ons get updated fairly quickly. I don't use NVDA because I'm extremely comfortable with my highly customised settings in JAWS and don't feel any need to switch ... that's an extremely weird position to take in certain parts of the blind community. Anyway, there are also mobile screen readers ... I know very little about those. I'd rather too many scope tags be used than too few ... and that the Manual of Style contain broadly applicable instructions rather than complex ones which are hard to follow ... Graham87 12:29, 14 August 2020 (UTC)
parameters and auto-sorting tables
What do the 'create', 'order', 'numeric', and 'ascending'/'descending' parameters and more mean, how do they function, and how do I use 'colspan' and 'rowspan', and use multiple headers or place headers in different locations on Module:AutosortTable, and how do I auto-sort tables and use the 'create', 'order', 'numeric', and 'ascending'/'descending' and the other parameters on tables? -- PK2 (talk) 10:35, 19 August 2020 (UTC)
- @PK2: Strictly speaking none of those are parameters. Modules follow the format of
{{#invoke: Module_name | function_name | arg1 | arg2 | arg3 ...}}
see mw:Extension:Scribunto for more details. - Hence,
create
is the name of the function being called;order
,numeric
, anddescending
(there is no ascending) are arguments.Order is for the sorting preference it takes a coma separated list of column numbers; if two values are the same the next lower preference is used.Numeric also accepts a coma separated list of column numbers; it designates which use numeric sorting.Descending is likewise a coma separated list of column numbers it inverts the normal sort order which is ascending by default.I'm not clear why you would want to use rowspan. Recalling that, post-sorting, any rowspanning cells are cut into individual rows with repeated content and remain that way even if the original sort order is restored.You autosort tables by converting them into the format used by this module (see Module:AutosortTable/testcases for examples) although in most cases I suspect you're better off using a standard sortable wikitable.I apologize if I haven't answered your question in full as I'm not sure I fully understood it; if you are looking for someone to write up the documentation for this module I can potentially do that but my time for this is quite limited at the moment (and I have quite a few things on my plate already) so it may be some time before I can get around to it.(please ping on reply)𝒬𝔔 16:58, 28 August 2020 (UTC)P.S. Please allow a few days for replies, I can usually respond within the week.
Partially collapsed table with vertical scrolling and show/hide links?
{{COVID-19 pandemic death rates by country}}
Is there a simple way to convert this below to a partially collapsed table with vertical scrolling? Along with show/hide links?
COVID-19 pandemic death rates by country. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Updated May 21, 2024.
|
{| class="wikitable mw-collapsible mw-collapsed" ![[COVID-19 pandemic death rates by country]]. |- |{{Template:COVID-19 pandemic death rates by country}} |}
References
- ^ Ritchie, Hannah; Mathieu, Edouard; Rodés-Guirao, Lucas; Appel, Cameron; Giattino, Charlie; Ortiz-Ospina, Esteban; Hasell, Joe; Macdonald, Bobbie; Beltekian, Diana; Dattani, Saloni; Roser, Max (2020–2022). "Coronavirus Pandemic (COVID-19)". Our World in Data. Retrieved 2024-05-21.
The table reference will show up in the references section of the article it is in. I used {{talk refs}} here to place the references in this talk section.
There is discussion here:
--Timeshifter (talk) 19:41, 27 August 2020 (UTC)
- @Timeshifter: This will do it
COVID-19 pandemic death rates by country. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Wikitext
|
---|
{| class="wikitable mw-collapsible" ![[COVID-19 pandemic death rates by country]]. |- |{{scrolling window|link=Template:COVID-19 pandemic death rates by country|height=150px|title=New articles}} |} |
References
- ^ Ritchie, Hannah; Mathieu, Edouard; Rodés-Guirao, Lucas; Appel, Cameron; Giattino, Charlie; Ortiz-Ospina, Esteban; Hasell, Joe; Macdonald, Bobbie; Beltekian, Diana; Dattani, Saloni; Roser, Max (2020–2022). "Coronavirus Pandemic (COVID-19)". Our World in Data. Retrieved 2024-05-21.
- Unfortunately I may not have time to read through the discussion at present, gotta finish checking my watch list here and on meta, also multitasking with real world stuff. However, I'm fairly certain that the manual of style discourages this usage in articlespace. (please ping on reply)𝒬𝔔 16:58, 28 August 2020 (UTC)
- Thanks Quantocius_Quantotius. I added a link to Template:Scrolling window to Help:Table#Scrolling. I also added a link to Template:COVID-19 pandemic data which is one of the few scrolling tables I have seen in article space.
- Is it possible with Template:Scrolling window to set it up with a link to fully expand a table? As with Template:COVID-19 pandemic data? And is it possible with Template:Scrolling window to fix the header row such that it stays visible while scrolling? As at Template:COVID-19 pandemic data.
- I wish to know the minimal wikitext involved with Template:COVID-19 pandemic data to do those 2 things: Full expansion and fixed header. Template:COVID-19 pandemic data has so much wikitext. Can you pull out the basics and use it here with Template:COVID-19 pandemic death rates by country?
- --Timeshifter (talk) 23:52, 28 August 2020 (UTC)
- Done, however review by a second set of eyes wouldn't hurt; I haven't really done serious css stuff for a few years now and I've managed to make a few (thankfully minor) errors in template coding in recent weeks. I took it a bit more slowly here to double check and I had a bit more time today but it's still possible I missed something.Other than that let me know if there's any other features you want and I'll try to get to them before the end of the month. Courtesy ping to Dudley Miles since you're working on this as well. I'm going to try to be around Sunday at least for 30 minutes if you have any immediate questions, if not you may need to wait until around the 21st to catch me again as the next two weeks should be bit busy for me, thanks. (please ping on reply)𝒬𝔔 22:43, 4 September 2020 (UTC)
- Thanks Quantocius Quantotius, but it is no longer necessary. See: User:Timeshifter/Sandbox119. --Timeshifter (talk) 01:18, 5 September 2020 (UTC)
- An improved version is at Template:COVID-19 pandemic death rates. Does this look OK? Dudley Miles (talk) 08:36, 30 August 2020 (UTC)
- It needs a collapse button that brings it back to the scrollable box. I asked for help here:
- Template talk:COVID-19 pandemic data#Need a link to collapse it back to its original scroll box size.
- Template talk:COVID-19 pandemic data/styles.css#Collapse link needed to collapse back to the original scroll box.
- --Timeshifter (talk) 10:34, 30 August 2020 (UTC)
Comment. Dudley Miles and Quantocius Quantotius. Please see User:Timeshifter/Sandbox119. The scrollable table now has a sticky header row that stays visible while scrolling. --Timeshifter (talk) 01:26, 5 September 2020 (UTC)
- Sticky header row problem has been solved. See:
- Template:COVID-19 pandemic death rates
- --Timeshifter (talk) 06:56, 6 September 2020 (UTC)
Syntax used in the /* Nested tables */ paragraph
Is there any reason while the example use the {{!}} syntax is used on the page instead of the simple |. Surely Readability is the more important consideration on a Help page.--ClemRutter (talk) 13:07, 13 October 2020 (UTC)
- @ClemRutter: yes there is a reason. Put simply '|' would not work in that example because the pipe needs to be escaped when used as part of a template argument or in table cell contents, so all nested tables must follow this format. Hope this answers your question.𝒬𝔔 16:28, 25 October 2020 (UTC)