diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2017-04-12 19:55:14 -0500 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2017-04-12 19:55:14 -0500 |
commit | 9ec58d8a67c611a5544c0994a8ef9f350a94d2db (patch) | |
tree | 6c47d8cfd2560e9968679bee46d8e1b2b19327fa /app/helpers/icons_helper.rb | |
parent | 18188a53466bf81adb583a4d5be7e21796b33ab3 (diff) | |
download | gitlab-ce-9ec58d8a67c611a5544c0994a8ef9f350a94d2db.tar.gz |
Add aria to icon
Diffstat (limited to 'app/helpers/icons_helper.rb')
-rw-r--r-- | app/helpers/icons_helper.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index ab3ef454e1c..ef260cff182 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -7,6 +7,11 @@ module IconsHelper # font-awesome-rails gem, but should we ever use a different icon pack in the # future we won't have to change hundreds of method calls. def icon(names, options = {}) + if !options['aria-hidden'] and !options['aria-label'] + # Add `aria-hidden` if there are no aria's set + options['aria-hidden'] = true + end + options.include?(:base) ? fa_stacked_icon(names, options) : fa_icon(names, options) end |