buildo / react-cookie-banner

React Cookie banner which can be automatically dismissed with a scroll. Because fuck The Cookie Law, that's why.
http://react-components.buildo.io/#cookiebanner
MIT License
182 stars 19 forks source link

Accessibility improvements: Button elements & a rel attributes #45

Closed FrancescoCioria closed 6 years ago

FrancescoCioria commented 6 years ago

requirements

copy pasted from this PR:

  1. Change the default close button & icon elements to use <button> elements, either instead of a div, or as an added wrapper around the <i> icon element. This is mainly to make these elements focusable, tabbable and clickable with a keyboard. Among other things, this change will improve accessibility for visually-impaired screenreader users, as well as users with reduced motor skills who might prefer to use a keyboard instead of a mouse.
  2. Add 'rel' attribute param to the link option. Allowing developers to add the rel attribute will enable them to set rel="noopener noreferrer" on external links, especially those which open in a new tab. This helps mitigate a security vulnerability and potentially improves performance too.
  3. Improve contrast of button foreground/background colours, to help meet WCAG text contrast guidelines.

specs

{optional: describe technical specs to implement this feature, if not obvious}

misc

{optional: other useful info}