Skip to content

Conversation

@chundhau
Copy link
Contributor

Overview

The Chapter 2 code builds a skeleton single-page web app using HTML and CSS. This pull request merges the code from Chapter 2 into the main branch. Closes #1.

Details

The skeleton app includes the following user interface components:

  • a favicon and app title in the app's browser title
  • a top navigation bar with menu button, app icon, and app area title
  • a expanding/contracting side menu with mode-specific items plus "About" and "Log Out"
  • a bottom bar for switching between three app modes: "Feed," "Rounds," and "Courses"
  • a floating action button for completing the most common task in the current mode.

A theme of Chapter 2 is designing web apps for accessibility through the use of semantic HTML and ARIA attributes. These have been used in the HTML code to enhance accessibility.

Here is a screenshot of the final state of the app at the end of Chapter 2:
Fig-2-9

Testing

I have tested the app via visual inspection. Additional testing using a screen reader emulator should be performed to assess the accessibility of the app.

* Added HTML to index.html
* Added classes  prefixed with 'navbar' to style.css
using semantic HTML and aria attributes
* index.html: Add modebar HTML to <body>
* style.css: Add classes prefixed with 'modebar'
* Add aria attributes to communicate structure and labels
* index.html: Include side menu HTML at bottom of <body> section
* style.css: Add classes prefixed with 'sidemenu-' to style menu
* index.html: HTML for button placed at bottom of <body> section
* style.css: float-btn and float-btn:hover classes defined
* index.html: Add HTML for "Feed" mode placeholder page at end of <body>
* style.css: Add CSS classes prefixed with 'app-page'
@chundhau chundhau added this to the Chapter 2 milestone Apr 22, 2021
@chundhau chundhau requested a review from warior4356 April 22, 2021 17:31
@chundhau chundhau self-assigned this Apr 22, 2021
@chundhau chundhau changed the title Ch2 Merge Chapter 2 code Apr 22, 2021
* Skip link added per convention
* Reimplemented side menu as unordered list per convention
* Placed bottom mode bar into tab sequence
* Redefined mode content pages as tab panels
* Wrote javascript to support correct keyboard menu behavior
* When user clicks on a bottom mode bar button, the mode switches
- the  button corresponding to new mode is highlighted
* The menu items, app page, and app title change to correspond to mode switch
- The global 'mode' variable is updated.
Used JS to make it link to content page of current mode
* Changed tab order so that action button comes before content
* This seems more logical.
* It now calls toggleSideMenu asking for first menu item to be focused
* When NVDA screen reader is on, it intercepts keydown events on buttons
* This prevented the first menu item from being focused, since that behavior
was bult into keydown
* w3 example has no <nav> container for menu <ol>
Changed menu-closed to display:none
* This appears to be what w3 example wants
* Indicates that menu is invisible to screen reader
* However, NVDA still seems to read menu when closed (?)
* Did not make all suggested changes pending discussion.
found by validator.w3.org
* Wrapped toggleMenu() in setTimeout so that screen readers
register the menu as closed when "esc" is used to
exit menu
* Focus outline now goes around entire menu item
(Could not figure out how to use <button> instead of <a>)
* Added "Post to Feed" button to demonstrate UI
* Fixed skip link
so that it uses new naming scheme
for app pages (e.g., "feedModeMain")
* App title changes when mode subpages become active
* Mode subpages are no longer tab panels
* Added "App Modes" aria-label to tabpanel
* Hid skip link when  mode subpage is active
@chundhau
Copy link
Contributor Author

chundhau commented May 2, 2021

@warior4356 This PR is obsolete. I am actually going to delete the ch2 branch and re-build it from scratch once I have the new accessible app design finalized in the accessible-base-app branch. Hence, this PR will ultimately be deleted and replaced with a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

As a speedgolfer, I can view SpeedScore's graphical user interface, so that I can get an overall feel for how the app is organized

2 participants