diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d7052f9e..573f0965 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,10 @@ ### 2 Install Vagrant. https://www.vagrantup.com/downloads.html -### 3 Capture the powers of vagrant +### 3 Install VirtualBox +https://www.virtualbox.org/wiki/Downloads + +### 4 Capture the powers of vagrant * In the repo dir: vagrant up (Safely ignore: 'dpkg-preconfigure: unable to re-open stdin: No such file or directory') * If changes have been made since running vagrant up: vagrant provision @@ -25,10 +28,10 @@ https://www.vagrantup.com/downloads.html [1] You can run any command locally using `rake vagrant:shell[]` and it will be executed in the repo root of the vagrant machine. You can try `rake vagrant:shell['pwd']` and see it will print the directory that the repo is in on the vagrant machine! -### 4 Optional tasks: +### 5 Optional tasks: run rake db:fix_accents to clean up encoding problems in the safe2pee data. (Use rake db:fix_accents[dry_run] to preview the changes.) -### 5 Assets +### 6 Assets * [Assets Repo](https://github.com/RefugeRestrooms/refuge_assets) ## Testing diff --git a/app/assets/images/patreon.png b/app/assets/images/patreon.png new file mode 100644 index 00000000..34e45eea Binary files /dev/null and b/app/assets/images/patreon.png differ diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index 004e20a2..ba88a904 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -14,4 +14,7 @@ refuge restrooms is open source. %a{:href => "https://github.com/RefugeRestrooms/refugerestrooms"} code on github. %br/ + contribute to the project + %a{:href => "https://patreon.com/refugerestrooms"} on patreon. + %br/ = "\© copyleft #{Date.today.year} refuge restrooms.".html_safe diff --git a/app/views/layouts/_search.html.haml b/app/views/layouts/_search.html.haml index c932a92d..fb5bcf9f 100644 --- a/app/views/layouts/_search.html.haml +++ b/app/views/layouts/_search.html.haml @@ -7,9 +7,9 @@ .input-group = text_field_tag :search, params[:search], class: "form-control search-bar", aria: {label: t("search_bar.enter_location")} .input-group-btn - %button.btn.btn-light-purple.submit-search-button{type: "button", title: "Search", value: "Search"} + %button.btn.btn-light-purple.submit-search-button{type: "button", title: "Search", value: "Search", aria: { label: "Search" }} %i.fa.fa-search.fa-2x %i.fa.fa-refresh.fa-spin.fa-2x - %button.btn.btn-light-purple.current-location-button{type: "button", title: "Search by Current Location", value: (splash ? "Search Current Location" : nil ) } + %button.btn.btn-light-purple.current-location-button{type: "button", title: "Search by Current Location", aria: { label: "Search by Current Location" }, value: (splash ? "Search Current Location" : nil ) } %i.fa.fa-location-arrow.fa-2x %i.fa.fa-refresh.fa-spin.fa-2x diff --git a/app/views/pages/index.html.haml b/app/views/pages/index.html.haml index d4bca4cf..48d8538c 100644 --- a/app/views/pages/index.html.haml +++ b/app/views/pages/index.html.haml @@ -16,12 +16,13 @@ = button_to new_restroom_path, method: :get, class: "btn btn-lg btn-purple splash-add-restroom-btn" do Add A Restroom %i.fa.fa-plus-square-o.fa-2x - .row.even-more-headroom - .col-xs-12.col-sm-6.col-sm-offset-3 + .col-xs-6.col-sm-3.col-sm-offset-3 = link_to image_tag("app-store.svg", role: "img"), "https://itunes.apple.com/us/app/refuge-restrooms/id968531953?mt=8" + .col-xs-6.col-sm-3 + = link_to image_tag("play-store.png"), "https://play.google.com/store/apps/details?id=org.refugerestrooms" .row.more-headroom.splash-bottom-padding .col-xs-12.col-sm-6.col-sm-offset-3 - = link_to image_tag("play-store.png"), "https://play.google.com/store/apps/details?id=org.refugerestrooms" + = link_to image_tag("patreon.png"), "https://patreon.com/refugerestrooms" = render 'layouts/footer' diff --git a/features/search.feature b/features/search.feature index 697d40c7..22988217 100644 --- a/features/search.feature +++ b/features/search.feature @@ -13,9 +13,14 @@ Feature: Search for restrooms And I search from Vancouver Then I should not see a restroom + Scenario: Search from splash page (screen reader accessibility check) + When I am on the splash page + Then the search buttons should have ARIA labels + Scenario: Map display Given a restroom exists in Winnipeg When I am on the splash page And I search from Winnipeg And I show the map Then I should see a restroom on the map + diff --git a/features/step_definitions/search_steps.rb b/features/step_definitions/search_steps.rb index 9bbc5360..fb357cd2 100644 --- a/features/step_definitions/search_steps.rb +++ b/features/step_definitions/search_steps.rb @@ -7,3 +7,8 @@ mock_location location find('.current-location-button').click end + +Then(/^the search buttons should have ARIA labels$/) do + expect(find('button.submit-search-button')['aria-label']).to be_truthy + expect(find('button.current-location-button')['aria-label']).to be_truthy +end