Skip to content

Commit

Permalink
fix(ally): Ensure buttons have discernible text (#430)
Browse files Browse the repository at this point in the history
* fix(ally): Ensure buttons have discernible text

* Remove margin on icon variation of input-group

---------

Co-authored-by: Lauren Hitchon <[email protected]>
  • Loading branch information
larowlan and laurenhitchon authored Jul 16, 2024
1 parent 5ac6951 commit 9392c4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/components/form/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ $nsw-form-tick: '<svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000
border-color: var(--nsw-grey-01);
border-left-width: 0;

.nsw-material-icons:first-child {
margin-right: 0;
}

.nsw-section--invert & {
color: var(--nsw-white);
border-color: var(--nsw-white);
Expand Down
2 changes: 1 addition & 1 deletion src/components/form/partials/_input-group.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="nsw-form__input-group{{#if icon}} nsw-form__input-group--icon{{/if}}{{#if large}} nsw-form__input-group--large{{/if}}">
<label class="sr-only" for="{{id}}">{{label}}</label>
<input class="nsw-form__input" type="text" id="{{id}}" name="{{id}}" value="{{value}}"{{#if predictive}} aria-autocomplete="list" autocomplete="off"{{/if}}>
<button class="nsw-button {{#if white}}nsw-button--white{{else}}nsw-button--dark{{/if}} nsw-button--flex" type="submit">{{#if icon}}<span class="material-icons nsw-material-icons" focusable="false" aria-hidden="true">{{icon}}</span>{{else}}{{label}}{{/if}}</button>
<button class="nsw-button {{#if white}}nsw-button--white{{else}}nsw-button--dark{{/if}} nsw-button--flex" type="submit">{{#if icon}}<span class="material-icons nsw-material-icons" focusable="false" aria-hidden="true">{{icon}}</span><span class="sr-only">{{label}}</span>{{else}}{{label}}{{/if}}</button>
</div>

0 comments on commit 9392c4e

Please sign in to comment.