Anonymous user
Module:Navbox: Difference between revisions
aria-labelledby fallbacks: title, otherwise above, otherwise lone group
m (1 revision imported) |
Enwikipedia>Matt Fitzpatrick (aria-labelledby fallbacks: title, otherwise above, otherwise lone group) |
||
Line 134:
titleCell
:tag('div')
-- id for aria-labelledby attribute
:attr('id', mw.uri.anchorEncode(args.title))
:addClass(args.titleclass)
Line 163 ⟶ 164:
:attr('colspan', getAboveBelowColspan())
:tag('div')
-- id for aria-labelledby attribute, if no title
:wikitext(processItem(args.above, args.nowrapitems))
end
Line 201 ⟶ 204:
if args['group' .. listnum] then
local groupCell = row:tag('th')
-- id for aria-labelledby attribute, if lone group with no title or above
if listnum == 1 and not (args.title or args.above or args.group2) then
groupCell
end
groupCell
Line 398 ⟶ 407:
:attr('role', 'navigation')
:node(tbl)
-- aria-labelledby title, otherwise above, otherwise lone group
if args.title or args.above or (args.group1 and not args.group2) then
▲ nav:attr('aria-labelledby', mw.uri.anchorEncode(args.title))
nav:attr('aria-labelledby', mw.uri.anchorEncode(args.title or args.above or args.group1))
else
nav:attr('aria-label', 'Navbox')
Line 419 ⟶ 429:
:css('padding', '3px')
:node(tbl)
-- aria-labelledby title, otherwise above, otherwise lone group
if args.title or args.above or (args.group1 and not args.group2) then
▲ nav:attr('aria-labelledby', mw.uri.anchorEncode(args.title))
nav:attr('aria-labelledby', mw.uri.anchorEncode(args.title or args.above or args.group1))
else
nav:attr('aria-label', 'Navbox')
|