https://bugzilla.wikimedia.org/show_bug.cgi?id=27666

           Summary: automatically adding of scope-attribute to
                    table-headers
           Product: MediaWiki
           Version: unspecified
          Platform: All
               URL: http://www.w3.org/TR/1999/REC-html401-19991224/struct/
                    tables.html#adef-scope
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: Page rendering
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: andbe...@web.de


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 :-)

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to