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

Update menubar navigation example #1587

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions examples/carousel/js/carousel-prev-next.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
*
*/

'use strict';

var CarouselPreviousNext = function (node, options) {
// merge passed options with defaults
options = Object.assign(
Expand Down
2 changes: 0 additions & 2 deletions examples/carousel/js/carousel-tablist.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
*
*/

'use strict';

// takes options object: { accessibleCaptions: boolean, autoplay: boolean, playButton: boolean }
// defaults are: { accessibleCaptions: true, autoplay: false, playButton: true }

Expand Down
2 changes: 0 additions & 2 deletions examples/combobox/js/combobox-autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
*/

'use strict';

var ComboboxAutocomplete = function (comboboxNode, buttonNode, listboxNode) {
this.comboboxNode = comboboxNode;
this.buttonNode = buttonNode;
Expand Down
2 changes: 0 additions & 2 deletions examples/combobox/js/grid-combo-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* ARIA Combobox Examples
*/

'use strict';

var FRUITS_AND_VEGGIES = [
['Apple', 'Fruit'],
['Artichoke', 'Vegetable'],
Expand Down
2 changes: 0 additions & 2 deletions examples/dialog-modal/js/alertdialog.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

var aria = aria || {};

aria.Utils = aria.Utils || {};
Expand Down
2 changes: 0 additions & 2 deletions examples/feed/js/feedDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
*/

'use strict';

/**
* @namespace aria
*/
Expand Down
2 changes: 0 additions & 2 deletions examples/grid/js/layoutGrids.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
*/

'use strict';

var aria = aria || {};

/**
Expand Down
2 changes: 0 additions & 2 deletions examples/grid/js/menuButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*
*/

'use strict';

/**
* ARIA Menu Button example
* @function onload
Expand Down
2 changes: 0 additions & 2 deletions examples/js/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* @namespace aria
*/

'use strict';

var aria = aria || {};

/* ---------------------------------------------------------------- */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
* Desc: Creates a menu button that opens a menu of actions using aria-activedescendants
*/

'use strict';

class MenuButtonActionsActiveDescendant {
constructor(domNode, performMenuAction) {
this.domNode = domNode;
Expand Down
2 changes: 0 additions & 2 deletions examples/menu-button/js/menu-button-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
* Desc: Creates a menu button that opens a menu of actions
*/

'use strict';

class MenuButtonActions {
constructor(domNode, performMenuAction) {
this.domNode = domNode;
Expand Down
2 changes: 0 additions & 2 deletions examples/menu-button/js/menu-button-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
* Desc: Creates a menu button that opens a menu of links
*/

'use strict';

class MenuButtonLinks {
constructor(domNode) {
this.domNode = domNode;
Expand Down
59 changes: 56 additions & 3 deletions examples/menubar/css/menubar-navigation.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,51 @@
#ex1 header {
border: #005a9c solid 2px;
background: #005a9c;
color: white;
text-align: center;
}

#ex1 header .title {
font-size: 2.5em;
font-weight: bold;
font-family: serif;
}

#ex1 header .tagline {
font-style: italic;
}

#ex1 .main {
padding-top: 1em;
padding-left: 5%;
padding-right: 5%;
padding-bottom: 5em;
border-left: 2px solid #eee;
border-right: 2px solid #eee;
}

#ex1 footer {
border: #005a9c solid 2px;
background: #005a9c;
font-family: serif;
color: white;
font-style: italic;
padding-left: 1em;
}

#ex1 nav {
margin: 0;
padding: 0;
border: 2px solid #eee;
}

.menubar-navigation {
margin: 0;
margin-top: 0.5em;
margin-bottom: 0.5em;
padding: 7px;
font-size: 110%;
list-style: none;
background-color: #eee;
border: #eee solid 1px;
border-radius: 5px;
}

.menubar-navigation li {
Expand Down Expand Up @@ -92,6 +130,21 @@
background-repeat: repeat-x;
}

/* aria-current styling */

.menubar-navigation [role="menuitem"][aria-current]::after {
content: url("../images/aria-current.svg");
position: relative;
left: 4px;
}

.menubar-navigation [role="menuitem"][aria-current] {
padding: 4px;
border: 2px solid #9c4200;
background-color: #9c4200;
color: white;
}

/* focus styling */

.menubar-navigation.focus {
Expand Down
4 changes: 4 additions & 0 deletions examples/menubar/images/aria-current.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading