Help talk:Table/Advanced
This is the talk page for discussing improvements to the Table/Advanced page. |
|
![]() | This help page does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||
|
![]() | 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. |
![]() | Material from Help:Table was split to Help:Table/Advanced on 9 December 2023. The former page's history now serves to provide attribution for that content in the latter page, and it must not be deleted so long as the latter page exists. Please leave this template in place to link the article histories and preserve this attribution. The former page's talk page can be accessed at Help talk:Table. |
Strange page name
[edit]This page, "Help:Table. Advanced", has an unusual name that does not conform to any page naming scheme I have seen on Wikipedia. Is it a mistake? If not, what is the reasoning behind the name? If it is a mistake (or a rough draft name), I recommend "Help:Table/Advanced" as a more standard name. – Jonesey95 (talk) 20:59, 15 December 2023 (UTC)
- It is odd and looks like a typo. I see a section header with the same period: "mw-datatable. Highlight rows. White background". I recommend the same, remove the periods. Jroberson108 (talk) 21:06, 15 December 2023 (UTC)
- Jonesey95. See: Wikipedia talk:Article titles#Leftover subpages? Slashes are for subpages. For example:
- Special:MyPage/vector-2022.css which for me is User:Timeshifter/vector-2022.css - For Vector 2022.
- Special:MyPage/sandbox which for me is User:Timeshifter/sandbox.
- To find subpages:
- Special:Prefixindex/User:Timeshifter/
- --Timeshifter (talk) 05:07, 16 December 2023 (UTC)
- Exactly. This page appears to be intended as an adjunct to Help:Table, like Help:Table/Width. Hence the suggestion of a similar name. The current name makes no sense to me, and to at least one other editor. Again, what is the reasoning behind the name? – Jonesey95 (talk) 05:14, 16 December 2023 (UTC)
- This is not a minor subpage. There are whole new areas of table info not previously discussed in Help:Table. --Timeshifter (talk) 05:28, 16 December 2023 (UTC)
- It looks like the admin Novem Linguae substituted the slash. See diff. Edit summary: "Novem Linguae moved page Help:Table. Advanced to Help:Table/Advanced: periods very uncommon in titles, slash better I think".
- I looked at Wikipedia:Article titles and did not see a prohibition of periods in titles.
- I was mainly concerned that it may be a questionable use of subpages.
- But I can live with the slash if an admin sees no problem with it. --Timeshifter (talk) 09:37, 16 December 2023 (UTC)
- I moved it without seeing this talk page discussion. I guess we all had the same idea :) –Novem Linguae (talk) 09:43, 16 December 2023 (UTC)
- @Timeshifter: If you still couldn't find it, the restriction is mentioned at WP:TSC. Jroberson108 (talk) 10:04, 17 December 2023 (UTC)
- This is not a minor subpage. There are whole new areas of table info not previously discussed in Help:Table. --Timeshifter (talk) 05:28, 16 December 2023 (UTC)
- Exactly. This page appears to be intended as an adjunct to Help:Table, like Help:Table/Width. Hence the suggestion of a similar name. The current name makes no sense to me, and to at least one other editor. Again, what is the reasoning behind the name? – Jonesey95 (talk) 05:14, 16 December 2023 (UTC)
The restriction is only for periods used in particular ways. WP:TSC links to:
A plain old period is not prohibited. As noted in the Novem Linguae edit summary: "periods very uncommon in titles". --Timeshifter (talk) 11:57, 17 December 2023 (UTC)
Fork
[edit]I just discovered Wikipedia:Advanced table formatting, which is a fairly clear WP:SAMETYPEFORK of this page. This page was created because Help:Table was too long. If we merge the two pages, we will be back where we started. My proposed solution is a split followed by a merge. This page currently deals with two related, but distinct, ideas. One is "what you can do with a table": sections like Horizontal alignment in cells, Sortable tables, and Collapsible tables. The other is "how you create a table": sections like Tables and visual editor, Spreadsheet/database tables to wikitables, and Add link brackets to text in each cell in a column. I think we should split those sections out into a page such as Help:Creating tables, and then merge Wikipedia:Advanced table formatting with this page and the newly created page (I realize that page is older, but I think a help page belongs in the help namespace). Thoughts? HouseBlastertalk 20:22, 31 December 2023 (UTC)
- HouseBlaster. Feel free to do so. Please do not delete anything yet though. Let's see what the 2 pages look like first. Also, then we will have separate histories for each page to see clearly what is then rewritten or deleted. --Timeshifter (talk) 20:51, 31 December 2023 (UTC)
- Only two weeks later, I have created Help:Creating tables. HouseBlaster (talk · he/him) 21:47, 18 January 2024 (UTC)
- HouseBlaster. Thanks. I will not be able to help much the next week or two. You still need to remove the duplicate sections from Help:Table/Advanced. --Timeshifter (talk) 16:58, 19 January 2024 (UTC)
- Only two weeks later, I have created Help:Creating tables. HouseBlaster (talk · he/him) 21:47, 18 January 2024 (UTC)
Aligning table text to top of cells?
[edit]Is there help on when/how to align the body of text in table cells in css or wikipedia markup? I see this for image blocks. — Preceding unsigned comment added by Evanwolf (talk • contribs) 21:10, 29 January 2025 (UTC)
- @Evanwolf: It's not part of table syntax; you need to use CSS styling. See below.
Three lines of text |
No alignment (default) | Top-aligned | Middle-aligned | Bottom-aligned |
- Documentation is here. --Redrose64 🌹 (talk) 22:00, 29 January 2025 (UTC)
See: Help:Table#Vertical alignment in cells. The CSS can be applied to a cell or a row.
Adjusted and simplified the wikitext. People using screen readers don't like breaks <br> in header text ("Three lines of text").
{| class=wikitable
|+ Demo of vertical alignment
|-
|style=max-width:3em |Three lines of text
|No alignment (default)
|style=vertical-align:top |Top-aligned
|style=vertical-align:middle |Middle-aligned
|style=vertical-align:bottom |Bottom-aligned
|}
Three lines of text | No alignment (default) | Top-aligned | Middle-aligned | Bottom-aligned |
I just found this template I did not know about:
It allows one to set all rows in a table to be either top or bottom aligned.
The HTML attribute valign is allowed, but obsolete. See: Help:HTML in wikitext#Tables. --Timeshifter (talk) 03:58, 30 January 2025 (UTC)
- "Three lines of text" isn't header text. It's just another data cell on the same row that just happens to come first. I purposely didn't mention the
valign
attribute, because it's obsolete in HTML5 (i.e. since 28 October 2014, just over ten years ago), and was deprecated more than 27 years ago (HTML 4.0, 18 December 1997 to be exact). Nobody should be using it in new tables. --Redrose64 🌹 (talk) 08:59, 30 January 2025 (UTC)
Line breaks in table cells
[edit]- Oops. Not header text. I think though that people with screen readers also don't like breaks in data cells in the middle of a sentence or phrase like "Three lines of text". --Timeshifter (talk) 16:08, 30 January 2025 (UTC)
- Let's ask an expert. Graham87, how do screen readers interpret the
<br />
tag? Is it as newlines, as spaces, or as something else? --Redrose64 🌹 (talk) 22:39, 30 January 2025 (UTC)- As newlines. Graham87 (talk) 08:32, 31 January 2025 (UTC)
Thank you --Redrose64 🌹 (talk) 20:29, 31 January 2025 (UTC)
- @Graham87: Thanks. How does your screen reader indicate newlines? I want this for the help pages so people see why that newlines in the wrong places can hurt accessibility. --Timeshifter (talk) 11:22, 1 February 2025 (UTC)
- By creating a new line at the point of the br tag. Graham87 (talk) 13:19, 1 February 2025 (UTC)
- As newlines. Graham87 (talk) 08:32, 31 January 2025 (UTC)
- Let's ask an expert. Graham87, how do screen readers interpret the
- Oops. Not header text. I think though that people with screen readers also don't like breaks in data cells in the middle of a sentence or phrase like "Three lines of text". --Timeshifter (talk) 16:08, 30 January 2025 (UTC)
@Graham87: - I mean what does the screen reader say when it comes upon a br tag? --Timeshifter (talk) 00:45, 2 February 2025 (UTC)
- It doesn't say anything. It just ... shows that there's a new line. Graham87 (talk) 03:36, 2 February 2025 (UTC)
- @Graham87: As the screen reader reads aloud "Three lines of text" in that cell using br tags does it pause at the line breaks? Is that annoying?
- I did some reading:
- https://www.google.com/search?q=how+do+screen+readers+indicate+a+new+line+or+line+break
- https://stackoverflow.com/questions/32204760/use-of-br-and-accessibility
- In the above link there seem to be various methods to eliminate that pause. Such as:
<br aria-hidden=true />
- But that is too much to expect of average table editors who often use breaks in header cells.
- Template:Break lines can add line breaks. Shortcut: {{brl}}
- Wikitext:
{{brl|Three
lines
of text}}
- Produces:
- Three
lines
of text - Maybe WP:VPT
- Can come up with a variation of {{brl}} that uses
<br aria-hidden=true />
- Maybe {{brh}} - short for Template:Line break hidden
- That would be easier to use than
style=max-width:3em
- Max-width requires fiddling with different widths to make it work.
- --Timeshifter (talk) 11:57, 2 February 2025 (UTC)
- Nope, my screen reader doesn't pause between new lines during say all by default (though it can be set that way). Honestly I'd rate the importance of extra line breaks for accessibility in cases like this about 0.01 out of 10, at the very most. Graham87 (talk) 12:19, 2 February 2025 (UTC)
- @Graham87: That's good to know. It makes things easier for table editors. So if screen readers nowadays ignore line breaks <br> by default, then table editors can just keep on adding line breaks to header and other cells. I will note that somewhere in the table help pages. Soon, I hope. --Timeshifter (talk) 12:49, 2 February 2025 (UTC)
- I never said they ignore line breaks (say all is a reading mode; a lot of people (including me) often read by arrowing up and down a page, or some other way). I think it's best to just leave things as they are. Graham87 (talk) 13:58, 2 February 2025 (UTC)
- @Graham87: OK. Will do. --Timeshifter (talk) 14:25, 2 February 2025 (UTC)
- I never said they ignore line breaks (say all is a reading mode; a lot of people (including me) often read by arrowing up and down a page, or some other way). I think it's best to just leave things as they are. Graham87 (talk) 13:58, 2 February 2025 (UTC)
- @Graham87: That's good to know. It makes things easier for table editors. So if screen readers nowadays ignore line breaks <br> by default, then table editors can just keep on adding line breaks to header and other cells. I will note that somewhere in the table help pages. Soon, I hope. --Timeshifter (talk) 12:49, 2 February 2025 (UTC)
- Nope, my screen reader doesn't pause between new lines during say all by default (though it can be set that way). Honestly I'd rate the importance of extra line breaks for accessibility in cases like this about 0.01 out of 10, at the very most. Graham87 (talk) 12:19, 2 February 2025 (UTC)