-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create cta component #21
Comments
Future work
|
Discovery work...RationaleRounded cornersRounded corners are not only easier for our eyes to process, but they also make information easier to process. Dark Grey, not Black#333333 dark grey + #FFFFFF white is not as stark as using #000000 for slightly less contrast making it a bit easier on the eye for normal vision whilst still high enough to be fully AAA WCAG compliant. Optimal size, 42px – 72px heightA study by Zhao Xia Jin (Honeywell, Shanghai) found that users had the lowest touch accuracy on buttons that were less than 42 pixels height. Buttons that were over 72 pixels also had low accuracy. This means that 42 pixels is the minimum and 72 pixels is the maximum button size that’s most optimal for users. Open Sans BoldAdds visual weight to the button, attracts attention and implies importance. Also helps legibility (particularly when reversed out) and reduces eye strain. IconsThe dimensions of each icon target are 24px sq. This passes the W3C’s WCAG Target Size Success Criterion. StatesActive state is the default state when a button is clickable. (Loading state is still to be looked into.) |
Here's a link to the Google Fonts page for Open Sans: Download and install it to view the correct font in the Sketch file. How to guide: https://support.apple.com/en-gb/guide/font-book/fntbk1000/mac |
Icons update: The dimensions of each icon target are 24px sq. This passes the W3C’s WCAG Target Size Success Criterion. All icons are using SVG based Font Awesome 6 Free. You will need to download it and install in your fomnt manager to view them in the Sketch file. https://fontawesome.com/download |
Update to align with the agreement in Refinement around the meaning of the Active state... Default state is the default state when a button is clickable but is not being interacted with. Active state is shown at the moment a user clicks the button. Using Muon Purple contrasts against the previous state and is momentary (for the duration of the click). |
StatesWe can leverage the Chroma.js for colour conversions, which may help to implement the different states of the button.
As an experiment I've introduced the colour Transforming this colour with We should be able to use Chroma.js to generate the tokens for mid-steps of a colour. It'll be a powerful addition to the colour and accessibility tooling. Be aware that this uses This can quickly get very complex. BidirectionallyApplying a reading direction to the document or the component with Use of
Consider Localisation if there's content that is displayed within assets. For example, if an icon displays a number to indicate a duration '30', then consider how this may be translated to other languages.
IconIt will be necessary to change the direction of the arrow within the button when the reading direction is changed from Windows High ContrastSpending the time to test and design with Windows High Contrast is a responsible thing to do. It helps concentrate the design effort towards an inclusive result. Microsoft spent time to standardise High Contrast features in Edge during the re-platform on top of Chromium.
OffsetInclude an offset to the outline when the button is in focus. This helps to identify that the button is in focus in High Contrast. Often the border and outline are both solid and display in the same colour. BorderIf the colour of the button is to be flat, choose the same colour for the background and the border. The border will display in High Contrast settings to identify the button. Without including a border, it's most likely that the background of the button will be the same background of the page. SVGsAt the time of writing, the colour of an SVG icon does not inherit the High Contrast system colour when using It looks like this will be fixed in a future release. It effects both Chrome and Edge. Firefox doesn't appear to respect Windows High Contrast in the same way. |
Thanks for the info Drew. States Bi-Dir Win Hi-Contrast SVGs |
Thanks Rob, The only point to mention is about the icons being SVGs and not a font. The Fontawesome icons are consumed by Muon as SVGs. Here is where we provide the URL to the CDN for the icon component to consume: e.g.: |
PR for cta enhancements and styling - https://github.com/centrica-engineering/muon/pull/67/files |
Outcome
To create a call-to-action component that allows users to take action once they are ready for it
Scope
Properties
Attributes
Token
State (active/focus/disabled/hover)
Key: * = Optional
The text was updated successfully, but these errors were encountered: