Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A11y – Accessibility version #435

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
f25fa02
Started on weather app, fetching todays weather and the forecast
HeleneWestrin Sep 24, 2024
d2a6506
Added forecast + styling
HeleneWestrin Sep 27, 2024
a92bef3
Restructured code, added day/night functionality, inline input search…
HeleneWestrin Sep 29, 2024
05c1516
Removed images
HeleneWestrin Sep 29, 2024
1460e8a
Favicon update
HeleneWestrin Sep 29, 2024
059335b
Added width and height to image to avoid layout shifts
HeleneWestrin Sep 29, 2024
b5b3b0f
Wait for fonts to load to avoid error in input width
HeleneWestrin Sep 29, 2024
b99c4e0
Small update
HeleneWestrin Sep 29, 2024
8073aea
Fixed messages and images for nighttime
HeleneWestrin Sep 30, 2024
58d140f
Remove is-nighttime if day
HeleneWestrin Sep 30, 2024
59817fb
ReadMe
HeleneWestrin Sep 30, 2024
0b72c49
Small update
HeleneWestrin Sep 30, 2024
0001a47
New message
HeleneWestrin Sep 30, 2024
e992ef3
Nighttime fix
HeleneWestrin Sep 30, 2024
1d681d3
Disable Password Managers
HeleneWestrin Sep 30, 2024
5b2c7a0
Clean-up
HeleneWestrin Sep 30, 2024
d20bb1d
Small update
HeleneWestrin Sep 30, 2024
c04b4f1
Initial changes for better accessibility
HeleneWestrin Oct 1, 2024
ba91337
Clearer messages for screen reader. Empty alt attributes for decorati…
HeleneWestrin Oct 1, 2024
df7a71c
Display the current city's time in sunrise and sunset
HeleneWestrin Oct 1, 2024
bdc8da7
Styling tweak
HeleneWestrin Oct 1, 2024
cc9ff53
Styling tweak
HeleneWestrin Oct 1, 2024
8460906
Updated the No city found message
HeleneWestrin Oct 1, 2024
a13bf98
Correct times for sunrise/sunset + code cleanup
HeleneWestrin Oct 5, 2024
091b286
Separate mainTitle and input for screen readers
HeleneWestrin Oct 5, 2024
3803057
H1 for screen reader fix
HeleneWestrin Oct 6, 2024
9e14206
Added label for screen readers
HeleneWestrin Oct 6, 2024
a842b66
Fix for isDayTime
HeleneWestrin Oct 6, 2024
f75c1d7
Fixed error with local current time + tested removing aria notification
HeleneWestrin Oct 6, 2024
f003252
Refactored getCurrentWeather
HeleneWestrin Oct 6, 2024
9bbc6a4
Re-added the aria notification
HeleneWestrin Oct 6, 2024
836fb27
theme-color added
HeleneWestrin Oct 6, 2024
bfcc6fb
Testing without screen reader H1 solution
HeleneWestrin Oct 6, 2024
40ab086
City name as label
HeleneWestrin Oct 6, 2024
a67d239
Assertive live region
HeleneWestrin Oct 6, 2024
3ddba35
Removed label... screen readers are HARD :P
HeleneWestrin Oct 6, 2024
69c9d11
ReadMe update
HeleneWestrin Oct 6, 2024
0858b91
Meta color update
HeleneWestrin Oct 6, 2024
67c0a6e
Removed unused code
HeleneWestrin Oct 6, 2024
72439f2
Small color update
HeleneWestrin Oct 6, 2024
bf1f4bb
Added aria-labelledby for the forecast title and list
HeleneWestrin Oct 7, 2024
1aabda7
All functions as arrow functions
HeleneWestrin Oct 7, 2024
4532cd1
Comments updated
HeleneWestrin Oct 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
37 changes: 31 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,38 @@
# Weather App
# The Weatherington – Accessible version

Replace this readme with your own information about your project.
The goal was to use the OpenWeatherMap API to create a weather app that shows the current weather in a city and also a 5-day forecast of that city.

Start by briefly describing the assignment in a sentence or two. Keep it short and to the point.
The goal of the second iteration was to make the app accessible.

## The problem
## The problem – Week #1

Describe how you approached to problem, and what tools and techniques you used to solve it. How did you plan? What technologies did you use? If you had more time, what would be next?
Based on my chosen design I started with outlining the HTML in my index file to plan for what I needed. I then started with the current weather, fetching that data and then outputting it on the web page.

The forecast was trickier to figure out. I first tried to just select 12:00 for each day, but then realized I couldn't get the min and max temp of each day that way. With some help from ChatGPT I figured out how to loop through each day and save the min and max temps.

I also decided to add a search in order to be able to switch city. I made it inline with the app title, which was a bit tricky to make work.

If I had more time I would have looked into timezones. Right now the sunrise and sunset times show the local times for the user, and not the city that's been entered.

## The problem – Week #2

I started with doing an accessibilty review of my app. In Lighthouse I got one thing to fix, and that was a label or aria-label attribute on my text field. Easy fix!

I also decided to enchance my colors (even though they did meet the contrast levels), just to make certain even more people found it readable.

The biggest hurdle, which I'm still not happy with, is the screen reader experience. I did some enhancements to make it make more sense:

- Adding todays date at the top, followed by the main title
- A paragraph about todays degrees and weather description
- Clearer copy for the sunrise and sunset times
- Adding a title to the forecast list and full weekday names
- Adding clear copy for the highest and lowest temps of the forecast days
- Aria live region for updating the user of what has changed after they enter a new city

However, making at least VoiceOver on Mac and iPhone read the H1 with the input inside it in a satisfactory way has proven difficult. Especially on iPhone. I've tried numerous ways, but there is always something that doesn't quite work out.

Would be fun to ask real screen reader users to test it and get some feedback!

## View it live

Every project should be deployed somewhere. Be sure to include the link to the deployed project so that the viewer can click around and see what it's all about.
[https://accessible-weather.netlify.app//](https://accessible-weather.netlify.app//)
Binary file added assets/.DS_Store
Binary file not shown.
Binary file added assets/animated/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions assets/animated/alert-avalanche-danger.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/animated/alert-falling-rocks.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/animated/barometer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/animated/beanie.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/animated/celsius.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/animated/clear-day.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/animated/clear-night.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/animated/cloud-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/animated/cloud-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading