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

issue-1051: added accessibility helpers #1170

Merged
merged 4 commits into from
Jul 27, 2016
Merged

issue-1051: added accessibility helpers #1170

merged 4 commits into from
Jul 27, 2016

Conversation

oliverfoster
Copy link
Member

@oliverfoster oliverfoster commented Jul 25, 2016

#1051

  • added a11y_attrs_heading(level) - for defining header attributes correctly
<div class="menu-title-inner h1 accessible-text-block" role="heading" aria-level="1" tabindex="0">
{{{displayTitle}}}
</div>
<div class="menu-title-inner h1 accessible-text-block" {{{a11y_attrs_heading 1}}}>
{{{displayTitle}}}
</div>
  • added a11y_attrs_tabbable - for defining tabbable attributes correctly
<div class="menu-title-inner h1 accessible-text-block" role="region" tabindex="0">
{{{displayTitle}}}
</div>
<div class="menu-title-inner h1 accessible-text-block" {{{a11y_attrs_tabbable}}}>
{{{displayTitle}}}
</div>
  • added a11y_aria_label - for defining aria labels correctly, for entry to a region, always appears at the top of a section
  • added a11y_aria_label_relative - for defining relatively positioned aria labels correctly, like at the bottom of pages or menus
<div class="menu-container" role="region" aria-label="{{_globals._menu._boxmenu.ariaRegion}}">

    <div class='menu-container-inner box-menu-inner clearfix'>

    </div>
    <div class="aria-label relative prevent-default" tabindex="0" role="region">{{_globals._menu._boxmenu.menuEnd}}</div>
</div>
<div class="menu-container">
    {{{a11y_aria_label _globals._menu._boxmenu.ariaRegion}}}

    <div class='menu-container-inner box-menu-inner clearfix'>

    </div>
    {{{a11y_aria_label_relative _globals._menu._boxmenu.menuEnd}}}
</div>
  • added a11y_wrap_focus - for defining where focus should wrap around to the beginning of the section, like drawer bottom, page/menu bottom etc
<div class="page-inner article-container" role="main" aria-label="{{_accessibility._ariaLabels.page}}">
</div>
{{{a11y_wrap_focus}}}

@lc-thomasberger
Copy link
Member

+1

@@ -116,6 +116,26 @@ define(function(require) {
return $.a11y_normalize(text);
});

Handlebars.registerHelper('a11y_aria_label', function(text) {
return '<div class="aria-label a11y-ignore-focus prevent-default" tabindex="0" role="region">'+text+'</div>';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the a11y-ignore-focus class on all the helpers?

@guywillis
Copy link
Contributor

+1

@oliverfoster oliverfoster self-assigned this Jul 26, 2016
@moloko
Copy link
Contributor

moloko commented Jul 26, 2016

are these all going to be documented somewhere?

@oliverfoster
Copy link
Member Author

Yes @moloko i'm going to update the core handlebars and add some behaviour for a11y_wrap_focus first.

@tomgreenfield
Copy link
Contributor

+1

1 similar comment
@moloko
Copy link
Contributor

moloko commented Jul 27, 2016

+1

@oliverfoster oliverfoster merged commit 9d43a02 into master Jul 27, 2016
@brian-learningpool brian-learningpool deleted the issue-1051 branch August 11, 2016 09:26
oliverfoster added a commit that referenced this pull request Dec 12, 2017
* correct email addresses for himanshu and aniket

* issue-1163: moved vanilla font into core (#1165)

* issue-1163: moved vanilla font into core

* issue-1163: removed redundant fonts

* issue-1164: moved theme common assets to core (#1166)

* issue-1160: expand less compiler for core (#1161)

* issue-1156-1157: added handlebars to core (#1158)

* issue-1156-1157: added handlebars to core

* issue-1156-1157: removed handlebars comments

* issue-1156-1157: removed buttons.hbs partial

* issue-1167: fix bug in create-json-config (#1168)

* issue-1051: added accessibility helpers (#1170)

* issue-1051: added accessibility helpers

* issue-1051: force spaces for attributes

* issue-1051: removed unnecessary a11y-ignore-focus

* issue-1159: add screenSize from theme to less (#1162)

* issue-1159: add screenSize from theme to less

* issue-1159: tabs > spaces

* issue-1159: tabs > spaces

* Issue-1159: changed console log

* Issue-1159: changed console log

* Fix indentation

* issue-1183: order of less compile, variables first

* issue-1185: make core assets theme relative (#1186)

* issue-1187: matching partial feedback fix (#1188)

* issue-1187: matching partial feedback fix

setupFeedback should be called through the view always in compatibility mode as some of its sub functions can live on the view only

* issue-1187: matching partial feedback fix

* Corrected Himanshu's email

* Less Enhancements

* Less Enhancements

* Less Enhancements

* Less Enhancements

* 1. Changed the folder structure
2. Normalized the code
3. Optimized Code
4. Shifted the Code to related files
5. Added new files direction.less, marking.less, notify-push.less to segregate the code
6. Rename file names paddings.less to spacings.less
7. Removed theme Dependency
8. Minor changes in the grunt tasks

* 1189 -- Less-Enhancements

* Amends implemented based on feedback from Guy

• Amend @item-color-hover and @button-hover-color to use secondary hex
value instead of variable in compatibility.less
• Update the disabled mixin in buttons.less (global) to the following:
o &.disabled { .disabled-style; }
o &:disabled { .disabled-style; }
o // IE8 fix needed to be in its own line
o &[disabled="disabled"] { .disabled-style; }
• Remove top CSS declaration from accessibility common mixin and move to
#a11y-focuser in accessibility.less
• Add bottom: 0; to #a11y-focusguard in accessibility.less
• Add bottom: 0; to #a11y-selected in accessibility.less
• Add RTL styles to button margins in buttons.less (modules)
• Remove RTL styles from .loading in loading.less
• Remove RTL styles from .notify-shadow in notify.less
• Move .component-container so it’s not nested under .block-inner in
block.less
• Remove .background-color-inverted from .block.less
• Remove component title / body inner padding CSS attributes in
component.less
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.

5 participants