# HG changeset patch # User bsw # Date 1550515596 -3600 # Node ID 3ab878ba277e688bb6d98346764e3c855dc27468 # Parent ce812dccaac2a081ec8864351d4976903dc8a173 Accessibility improvements part 1 diff -r ce812dccaac2 -r 3ab878ba277e app/main/_filter_view/30_navigation.lua --- a/app/main/_filter_view/30_navigation.lua Mon Jan 07 19:16:30 2019 +0100 +++ b/app/main/_filter_view/30_navigation.lua Mon Feb 18 19:46:36 2019 +0100 @@ -67,7 +67,7 @@ ui.tag{ tag = "nav", attr = { class = "mdl-navigation" }, content = function() local link = { content = function() - ui.tag{ tag = "i", attr = { class = "material-icons" }, content = "exit_to_app" } + ui.tag{ tag = "i", attr = { class = "material-icons", ["aria-hidden"] = "true", role="presentation" }, content = "exit_to_app" } slot.put(" ") ui.tag{ attr = { class = "mdl-layout--large-screen-only" }, content = function() ui.tag{ content = _"Login" } diff -r ce812dccaac2 -r 3ab878ba277e app/main/_layout/default.html --- a/app/main/_layout/default.html Mon Jan 07 19:16:30 2019 +0100 +++ b/app/main/_layout/default.html Mon Feb 18 19:46:36 2019 +0100 @@ -605,6 +605,10 @@ margin-bottom: 2ex; } + .contextlinks { + font-size: 14px; + margin-bottom: 5px; + } /************************************************************************* * Voting diff -r ce812dccaac2 -r 3ab878ba277e app/main/delegation/_info.lua --- a/app/main/delegation/_info.lua Mon Jan 07 19:16:30 2019 +0100 +++ b/app/main/delegation/_info.lua Mon Feb 18 19:46:36 2019 +0100 @@ -188,9 +188,10 @@ slot.put(" ") ui.tag{ content = _"you are interested" } if not issue.closed and info.own_participation and info.weight and info.weight > 1 then + slot.put(" ") ui.link { attr = { class = "right" }, content = "+" .. (info.weight - 1), - module = "delegation", view = "show_incoming", params = { + module = "interest", view = "show_incoming", params = { issue_id = issue.id, member_id = member.id } } diff -r ce812dccaac2 -r 3ab878ba277e app/main/draft/diff.lua --- a/app/main/draft/diff.lua Mon Jan 07 19:16:30 2019 +0100 +++ b/app/main/draft/diff.lua Mon Feb 18 19:46:36 2019 +0100 @@ -11,9 +11,7 @@ ui.tag{ content = _"Please choose two different versions of the draft to compare" } end ) request.redirect{ - module = "draft", view = "list", params = { - initiative_id = initiative_id - } + module = "initiative", view = "history", id = initiative_id } return end diff -r ce812dccaac2 -r 3ab878ba277e app/main/index/_head.lua --- a/app/main/index/_head.lua Mon Jan 07 19:16:30 2019 +0100 +++ b/app/main/index/_head.lua Mon Feb 18 19:46:36 2019 +0100 @@ -138,5 +138,12 @@ --ui.container{ attr = { class = "mdl-card__actions mdl-card--border" }, content = function() --end } end } +else + ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function() + ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function() + ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"All issues" } + end } + ui.container{ attr = { class = "mdl-card__supporting-text mdl-card--border" }, content = _"All issues in your units. Use filters above to limit results." } + end } end diff -r ce812dccaac2 -r 3ab878ba277e app/main/initiative/history.lua --- a/app/main/initiative/history.lua Mon Jan 07 19:16:30 2019 +0100 +++ b/app/main/initiative/history.lua Mon Feb 18 19:46:36 2019 +0100 @@ -37,27 +37,29 @@ local columns = { { - label = _"draft ID", content = function(record) - ui.tag { content = record.id } - end - }, - { - label = _"published at", - content = function(record) + slot.put('") end }, { - label = _"compare", content = function(record) - slot.put('') - slot.put('') - --lot.put('') + slot.put('") end } } diff -r ce812dccaac2 -r 3ab878ba277e app/main/issue/_filters.lua --- a/app/main/issue/_filters.lua Mon Jan 07 19:16:30 2019 +0100 +++ b/app/main/issue/_filters.lua Mon Feb 18 19:46:36 2019 +0100 @@ -114,7 +114,24 @@ end filters[#filters+1] = filter - + +--[[ + else + + local filter = { class = "filter_unit", name = "area", label = _"area" } + + filter[#filter+1] = { + name = "all", + label = _"all subject areas", + selector_modifier = function() end + } + filter[#filter+1] = { + name = "_dummy", + label = _"Select unit first", + selector_modifier = function(selector) end + } + filters[#filters+1] = filter +--]] end if app.session.member_id then diff -r ce812dccaac2 -r 3ab878ba277e app/main/issue/_list.lua --- a/app/main/issue/_list.lua Mon Jan 07 19:16:30 2019 +0100 +++ b/app/main/issue/_list.lua Mon Feb 18 19:46:36 2019 +0100 @@ -196,48 +196,33 @@ if not for_issue and not for_initiative then ui.container{ attr = { class = "mdl-card__title mdl-card--has-fab mdl-card--border" }, content = function() - if not (config.single_unit_id and config.single_area_id) then - if not config.single_unit_id then - slot.put ( " " ) - ui.link{ - module = "index", view = "index", params = { unit = issue.area.unit_id }, - attr = { class = "mdl-chip unit" }, content = function() - ui.tag{ attr = { class = "mdl-chip__text" }, content = function() - ui.tag{ tag = "i", attr = { class = "material-icons" }, content = "flag" } - slot.put(" ") - ui.tag{ content = issue.area.unit.name } - end } - end - } + ui.container{ attr = { class = "contextlinks" }, content = function() + if not (config.single_unit_id and config.single_area_id) then + if not config.single_unit_id then + slot.put ( " " ) + ui.link{ + module = "index", view = "index", params = { unit = issue.area.unit_id }, + attr = { class = "unit" }, content = issue.area.unit.name + } + end + if not config.single_area_id then + slot.put(" » ") + ui.link{ + module = "index", view = "index", params = { unit = issue.area.unit_id, area = issue.area_id }, + attr = { class = "area" }, content = issue.area.name + } + end end - if not config.single_area_id then - slot.put(" ") - ui.link{ - module = "index", view = "index", params = { unit = issue.area.unit_id, area = issue.area_id }, - attr = { class = "mdl-chip area" }, content = function() - ui.tag{ attr = { class = "mdl-chip__text" }, content = function() - ui.tag{ tag = "i", attr = { class = "material-icons" }, content = "folder" } - slot.put(" ") - ui.tag{ content = issue.area.name } - end} - end - } - end - end - --ui.heading{ level = 2, attr = { class = "mdl-card__title-text", style = "display: block;" }, content = function() - slot.put(" ") + slot.put(" » ") ui.link{ module = "issue", view = "show", id = issue.id, - attr = { class = "mdl-chip issue" }, content = function() - ui.tag{ tag = "i", attr = { class = "material-icons" }, content = "label" } - slot.put(" ") - ui.tag{ attr = { class = "mdl-chip__text" }, content = issue.name } - end } - --end } + attr = { class = "issue" }, content = issue.name + } + end } ui.container{ attr = { class = "mdl-card__subtitle-text .mdl-cell--hide-phone" }, content = function() ui.container{ attr = { class = class }, content = function () if event_icon then - ui.tag{ tag = "i", attr = { class = "material-icons" }, content = event_icon } + ui.tag{ tag = "i", attr = { class = "material-icons", ["aria-hidden"] = "true" }, content = event_icon } end slot.put(" ") ui.tag { content = event_name } @@ -419,6 +404,8 @@ filters.class = "mdl-special-card mdl-card__fullwidth mdl-shadow--2dp" +filters.legend = _"Filter issues:" + ui.filters(filters) diff -r ce812dccaac2 -r 3ab878ba277e app/main/member/edit.lua --- a/app/main/member/edit.lua Mon Jan 07 19:16:30 2019 +0100 +++ b/app/main/member/edit.lua Mon Feb 18 19:46:36 2019 +0100 @@ -25,7 +25,7 @@ }, content = function() - ui.container{ content = _"All fields are optional. Please enter only data which should be published." } +-- ui.container{ content = _"All fields are optional. Please enter only data which should be published." } if config.member_profile_fields then for i, field in ipairs(config.member_profile_fields) do diff -r ce812dccaac2 -r 3ab878ba277e env/ui/filters.lua --- a/env/ui/filters.lua Mon Jan 07 19:16:30 2019 +0100 +++ b/env/ui/filters.lua Mon Feb 18 19:46:36 2019 +0100 @@ -5,9 +5,14 @@ if args.class then class = class .. " " .. args.class end - ui.container{ + ui.tag{ + tag = "fieldset", attr = { class = { class } }, content = function() + local legend = args.legend + if legend then + ui.tag{ tag = "legend", attr = { style = "display: none;" }, content = legend } + end for idx, filter in ipairs(args) do local filter_name = filter.name or "filter" local current_option_name = atom.string:load(request.get_param{ name = filter_name }) @@ -26,7 +31,7 @@ ui.tag{ tag = "button", attr = { id = "filter-" .. filter_name .. "-menu", class = "mdl-button mdl-js-button" }, content = function() ui.tag{ content = current_option.label } slot.put(" ") - ui.tag{ tag = "i", attr = { class = "material-icons" }, content = "arrow_drop_down" } + ui.tag{ tag = "i", attr = { class = "material-icons", ["aria-hidden"] = "true" }, content = "arrow_drop_down" } end } local id = request.get_id_string() local params = request.get_param_strings()