chore(): sync with main

This commit is contained in:
Liam DeBeasi
2023-01-18 09:36:43 -05:00
193 changed files with 825 additions and 976 deletions

View File

@ -188,10 +188,20 @@ export class Loading implements ComponentInterface, OverlayInterface {
};
render() {
const { message, spinner, htmlAttributes } = this;
const { message, spinner, htmlAttributes, overlayIndex } = this;
const mode = getIonMode(this);
const msgId = `loading-${overlayIndex}-msg`;
/**
* If the message is defined, use that as the label.
* Otherwise, don't set aria-labelledby.
*/
const ariaLabelledBy = message !== undefined ? msgId : null;
return (
<Host
role="dialog"
aria-modal="true"
aria-labelledby={ariaLabelledBy}
tabindex="-1"
{...(htmlAttributes as any)}
style={{
@ -209,14 +219,16 @@ export class Loading implements ComponentInterface, OverlayInterface {
<div tabindex="0"></div>
<div class="loading-wrapper ion-overlay-wrapper" role="dialog">
<div class="loading-wrapper ion-overlay-wrapper">
{spinner && (
<div class="loading-spinner">
<ion-spinner name={spinner} aria-hidden="true" />
</div>
)}
{message !== undefined && <div class="loading-content" innerHTML={sanitizeDOMString(message)}></div>}
{message !== undefined && (
<div class="loading-content" id={msgId} innerHTML={sanitizeDOMString(message)}></div>
)}
</div>
<div tabindex="0"></div>