Skip to content

Commit 0d38a72

Browse files
authored
Merge pull request #2382 from microsoftgraph/merge/update-from-main
chore: update from main
2 parents bc5b834 + c0f7630 commit 0d38a72

File tree

5 files changed

+27
-4
lines changed

5 files changed

+27
-4
lines changed

packages/mgt-components/src/components/mgt-file-list/mgt-file-upload/mgt-file-upload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ export class MgtFileUpload extends MgtBaseComponent {
884884
this._dialogTitle = strings.maximumFileSizeTitle;
885885
this._dialogContent =
886886
strings.maximumFileSize
887-
.replace('{FileSize}', formatBytes(fileUploadList.maxFileSize))
887+
.replace('{FileSize}', formatBytes(fileUploadList.maxFileSize * 1024))
888888
.replace('{FileName}', file.name) +
889889
formatBytes(file.size) +
890890
'.';

packages/mgt-components/src/components/mgt-login/mgt-login.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ $button-padding: var(--login-button-padding, 0);
6767
}
6868
}
6969
}
70+
71+
&:focus-visible {
72+
outline-style: $focus-ring-style;
73+
}
7074
}
7175

7276
fluent-card {

packages/mgt-components/src/components/mgt-people-picker/mgt-people-picker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
938938
person => person.id,
939939
person => {
940940
const lineTwo = person.jobTitle || (person as User).mail;
941-
const ariaLabel = `${this.strings.suggestedContact} ${person.displayName} ${lineTwo ?? ''}`;
941+
const ariaLabel = `${person.displayName} ${lineTwo ?? ''}`;
942942
return html`
943943
<li
944944
id="${person.id}"

packages/mgt-components/src/styles/shared-styles.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
@import './shared-sass-variables';
99

10+
$focus-ring-style: var(--focus-ring-style, auto);
11+
1012
:host([hidden]) {
1113
display: none;
1214
}
@@ -20,6 +22,19 @@
2022
--theme-dark-color: #005a9e;
2123
}
2224

25+
:focus-visible {
26+
// ensure default is correctly set for Firefox
27+
outline-color: var(--focus-ring-color, Highlight);
28+
29+
// ensure default is set for other browsers
30+
/* stylelint-disable-next-line declaration-block-no-duplicate-properties */
31+
outline-color: var(--focus-ring-color, -webkit-focus-ring-color);
32+
33+
// set the style of the focus ring
34+
// this needs to be something other than auto in Firefox to use the custom color
35+
outline-style: $focus-ring-style;
36+
}
37+
2338
.ms-icon {
2439
display: inline-block;
2540
font-family: $font-icon;

stories/samples/general.stories.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ export const cache = () => html`
162162
</script>
163163
`;
164164
export const theme = () => html`
165-
<div class="mgt-light">
165+
<div class="mgt-light root">
166166
<header class="mgt-dark">
167167
<p>I should be dark, regional class</p>
168-
<mgt-teams-channel-picker></mgt-teams-channel-picker>
168+
<mgt-people-picker></mgt-people-picker>
169169
<div class="mgt-light">
170170
<p>I should be light, second level regional class</p>
171171
<mgt-teams-channel-picker></mgt-teams-channel-picker>
@@ -183,6 +183,10 @@ export const theme = () => html`
183183
<mgt-teams-channel-picker class="mgt-foo"></mgt-teams-channel-picker>
184184
</div>
185185
<style>
186+
.root {
187+
--focus-ring-color: red;
188+
--focus-ring-style: solid;
189+
}
186190
.custom1 {
187191
--input-border: 2px solid teal;
188192
--input-background-color: #33c2c2;

0 commit comments

Comments
 (0)