Module:NavboxMobile: Difference between revisions
EnWikiAdmin (talk | contribs) No edit summary |
EnWikiAdmin (talk | contribs) No edit summary |
||
Line 537: | Line 537: | ||
-- Wrap the table within a navigation div with ARIA attributes | -- Wrap the table within a navigation div with ARIA attributes | ||
local navWrapper = mw.html.create('div') | local navWrapper = mw.html.create('div') | ||
:addClass('navboxMobile-container') -- Add consistent container | |||
:attr('role', 'navigation') | :attr('role', 'navigation') | ||
if args.title or args.above or (args.group1 and not args.group2) then | if args.title or args.above or (args.group1 and not args.group2) then | ||
Line 551: | Line 552: | ||
-- Assume this navboxMobile is inside a parent navboxMobile's list cell | -- Assume this navboxMobile is inside a parent navboxMobile's list cell | ||
-- Insert closing and opening divs to manage padding | -- Insert closing and opening divs to manage padding | ||
local subgroupWrapper = mw.html.create('div') | |||
: | :addClass('navboxMobile-container') -- Consistent wrapping container | ||
:node(tbl) | :node(tbl) -- Add the table as a child | ||
res:node(subgroupWrapper) | |||
else | else | ||
-- Wrap the table within a navigation div with additional classes and styles | -- Wrap the table within a navigation div with additional classes and styles | ||
local navWrapper = mw.html.create('div') | local navWrapper = mw.html.create('div') | ||
:addClass('navboxMobile-container') -- Add consistent container | |||
:attr('role', 'navigation') | :attr('role', 'navigation') | ||
:addClass('navboxMobile') -- Add appropriate classes | :addClass('navboxMobile') -- Add appropriate classes |