Last modified: 2013-03-10 21:34:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 27666 - automatically adding of scope-attribute to table-headers
automatically adding of scope-attribute to table-headers
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://www.w3.org/TR/1999/REC-html401...
: accessibility
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-23 20:46 UTC by Bergi
Modified: 2013-03-10 21:34 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bergi 2011-02-23 20:46:06 UTC
I propose to automatically add the scope-attribute to <th>-elements. This is usefull for non-graphical user clients, and also helps to a more semantic html. There was a request on de.wikipedia to add the attribute to infoboxes, which are often build like this:
<tr>
 <th> Description </th>
 <td> Value </td>
</tr>...
I guess an algorithm like this:
The scope-attribute is appended to <th> when
* there is no wikitext-defined attribute (allows overwriting)
* the <th> is the first element in its row and when its the single <th>
  * when it has a rowspan-attribute it gets "rowgroup"
  * else it gets "row"
* there are only <th>s in this row
  * when it has a colspan-attribute it gets "colgroup"
  * else it gets "col"
  * when its the first in its row we might check the row below? When there's also a <th> in the beginning we should set no scope-attribute. The best would be checking at which "coordinates" the first <td> appears, so everything left /or/ above could get a appropriate row/col-scope, everything left /and/ above should get nothing. This would work with headers grouped by cells a second row/column, too, but it's not easy to implement.
And we might have to watch for rtl-tables :-)
Comment 1 Michael Zajac 2013-03-10 21:34:23 UTC
The scope attribute has a default value of “auto,” which responds to the table processing model in a predictable way. This proposal would replace that with a new, unpredictable default behaviour, and require us to add scope="auto" to restore normal behaviour. 

The normal behaviour of th scope is complex enough, without having to learn another way it works in wiki tables, based on a far less detailed spec than the relevant part of HTML5.

I would prefer the scope attribute in wikis to work the same way it does in all other web pages.


Reference: 
http://www.w3.org/html/wg/drafts/html/master/tabular-data.html#the-th-element
http://www.w3.org/html/wg/drafts/html/master/tabular-data.html#header-and-data-cell-semantics

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links