Code Monkey home page Code Monkey logo

kcalerts-restapi's People

Contributors

melmai avatar

Stargazers

 avatar

Watchers

 avatar  avatar

kcalerts-restapi's Issues

Snow routes icon

ISSUE: Snow Route alerts display generic alert icon.
FIX: Add conditional to render snow icon for Snow Route alerts.

Add alert banners for system wide alerts

The current version requires alerts to be associated with a route to display. System wide alerts do not have this. Will need to implement banners to display on the home page for System alerts.

Example:
{ "alert_id": 1713, "effect_name": "Snow Routes", "effect": "DETOUR", "cause_name": "snow", "cause": "WEATHER", "header_text": "Snow is falling across King County, but Metro buses are currently able to operate on their regular routes. Transit Alerts will be sent out if there is a need to switch to snow routes.", "short_header_text": "Snow is falling across King County, but Metro buses are regular operation", "url": "https://kingcountymetro.blog/", "severity": "Significant", "created_dt": "1670339549", "last_modified_dt": "1670428019", "service_effect_text": "Bus, Marine and Rail service is operating on snow routes.", "alert_lifecycle": "New", "banner_text": "Snow is falling across King County, but Metro buses are currently able to operate on their regular routes. Transit Alerts will be sent out if there is a need to switch to snow routes.", "effect_periods": [{ "effect_start": "1670339520", "effect_end": "" }], "affected_services": { "services": [ { "route_type": "0", "mode_name": "Light Rail" }, { "route_type": "3", "mode_name": "Bus" }, { "route_type": "4", "mode_name": "Boat" } ], "elevators": [] } }

Status badge accessibility

Here's a page from Stack Overflow that talks about accessibility of numeric badges and pills: https://stackoverflow.com/questions/68170589/do-html-elements-like-pill-badge-need-extra-aria-role

If we use the featured answer on our project, it would be like this:

<div class="route-status">
<span role="status" class="ongoing" aria-label="2 ongoing alerts">2</span>
<span role="status" class="upcoming" aria-label="1 upcoming alerts">1</span>
</div>

However, there are problems with starting a label with a number when the accordion title ends with a number. When I listen to Route 120 with the aria-label is in place, I hear:

"Route one twenty two ongoing alerts one upcoming alerts" (so it sounds like it's Route 122 and not Route 120.)

Maybe we should just use aria-hidden="true" to hide the status altogether.

Update ID of root container

Issue: The current ID of the container that holds all of the alerts will collide with Sitecore10 accordion elements.
Solution: Need to update the ID to be unique.

Update single alert display

Need to update the alerts to display:

  1. link in description
  2. update verbiage from View/Hide to Show/Hide
  3. shorten effective dates to only start dates

Conditional link to snow map

Add a link to display before the accordion of route alerts. This link should only display when there are active snow alerts.

Accessibility of Dates

Screen reader reads out slashes for dates

<p class="en-translation" aria-labelledby="effective-date-label">             <span class="sr-only" id="effective-date-label">Effective March 18 thru September 1, 2023</span>             <span aria-hidden="true">Effective 3/18/2023 thru 9/1/2023</span>  </p>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.