-
Notifications
You must be signed in to change notification settings - Fork 250
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+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>'; |
There was a problem hiding this comment.
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?
+1 |
are these all going to be documented somewhere? |
Yes @moloko i'm going to update the core handlebars and add some behaviour for a11y_wrap_focus first. |
+1 |
1 similar comment
+1 |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#1051
a11y_attrs_heading(level)
- for defining header attributes correctlya11y_attrs_tabbable
- for defining tabbable attributes correctlya11y_aria_label
- for defining aria labels correctly, for entry to a region, always appears at the top of a sectiona11y_aria_label_relative
- for defining relatively positioned aria labels correctly, like at the bottom of pages or menusa11y_wrap_focus
- for defining where focus should wrap around to the beginning of the section, like drawer bottom, page/menu bottom etc