diff --git a/app/assets/stylesheets/components/pill.scss b/app/assets/stylesheets/components/pill.scss index 224a56d98..be3619984 100644 --- a/app/assets/stylesheets/components/pill.scss +++ b/app/assets/stylesheets/components/pill.scss @@ -2,24 +2,19 @@ display: flex; - a, - span { - display: block; + li { width: 25%; - box-sizing: border-box; - float: left; - padding: 10px; flex-grow: 1; text-align: left; + } - &:first-child { - margin-left: 0; - } - - &:last-child { - margin-right: 0; - } - + a, + &-selected-item { + display: block; + float: left; + box-sizing: border-box; + width: 100%; + padding: 10px; } a { @@ -50,12 +45,18 @@ } } - span { + &-selected-item { border: 2px solid $black; outline: 1px solid rgba($white, 0.1); position: relative; z-index: 1000; color: $text-colour; + + &:focus { + z-index: 10; + outline: 3px solid $yellow; + } + } } diff --git a/app/templates/components/pill.html b/app/templates/components/pill.html index c77810e5c..efd895069 100644 --- a/app/templates/components/pill.html +++ b/app/templates/components/pill.html @@ -1,26 +1,27 @@ {% from 'components/big-number.html' import big_number %} {% macro pill( - title, items=[], current_value=None, big_number_args={'smaller': True} ) %} - + {% endmacro %} diff --git a/app/templates/components/table.html b/app/templates/components/table.html index fef690fd0..b21fc3dc9 100644 --- a/app/templates/components/table.html +++ b/app/templates/components/table.html @@ -61,19 +61,19 @@ {% set border = '' if border else 'table-field-noborder' %}
diff --git a/app/templates/views/activity/counts.html b/app/templates/views/activity/counts.html index b396bb064..b73738966 100644 --- a/app/templates/views/activity/counts.html +++ b/app/templates/views/activity/counts.html @@ -2,7 +2,6 @@
diff --git a/tests/app/main/views/test_dashboard.py b/tests/app/main/views/test_dashboard.py index bd2b4b895..8f55970c6 100644 --- a/tests/app/main/views/test_dashboard.py +++ b/tests/app/main/views/test_dashboard.py @@ -250,11 +250,11 @@ def test_usage_page( page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser') cols = page.find_all('div', {'class': 'column-half'}) - nav = page.find('nav', {'class': 'pill'}) + nav = page.find('ul', {'class': 'pill', 'role': 'tablist'}) nav_links = nav.find_all('a') assert normalize_spaces(nav_links[0].text) == '2010 to 2011 financial year' - assert normalize_spaces(nav.find('span').text) == '2011 to 2012 financial year' + assert normalize_spaces(nav.find('li', {'aria-selected': 'true'}).text) == '2011 to 2012 financial year' assert normalize_spaces(nav_links[1].text) == '2012 to 2013 financial year' assert '123' in cols[0].text