Anonymous user
Module:Navbox: Difference between revisions
navigation div instead of single-cell table wrapper
Enwikipedia>Izkala (Kill nowikis) |
Enwikipedia>Matt Fitzpatrick (navigation div instead of single-cell table wrapper) |
||
Line 116:
titleCell
:wikitext(addNewline(args.title))
end
Line 360 ⟶ 361:
local res = mw.html.create()
if border == 'none' then
local nav = res:
:attr('role', 'navigation')
:node(tbl)
if args.title then
nav:attr('aria-labelledby', mw.uri.anchorEncode(args.title))
else
nav:attr('aria-label', 'Navbox')
end
elseif border == 'subgroup' or border == 'child' then
-- We assume that this navbox is being rendered in a list cell of a parent navbox, and is
Line 370 ⟶ 378:
:wikitext('<div>') -- XXX: hack due to lack of unclosed support in mw.html.
else
local nav = res:tag('div')
:
if args.title
nav:attr('aria-label', 'Navbox')
end
end
|