diff --git a/core/src/components/alert/alert.tsx b/core/src/components/alert/alert.tsx index bcb4e0e46a..3aac3a0069 100644 --- a/core/src/components/alert/alert.tsx +++ b/core/src/components/alert/alert.tsx @@ -373,22 +373,24 @@ export class Alert implements ComponentInterface, OverlayInterface { return values; } - private renderAlertInputs(labelledBy: string | undefined) { + private renderAlertInputs() { switch (this.inputType) { - case 'checkbox': return this.renderCheckbox(labelledBy); - case 'radio': return this.renderRadio(labelledBy); - default: return this.renderInput(labelledBy); + case 'checkbox': return this.renderCheckbox(); + case 'radio': return this.renderRadio(); + default: return this.renderInput(); } } - private renderCheckbox(labelledby: string | undefined) { + private renderCheckbox() { const inputs = this.processedInputs; const mode = getIonMode(this); + if (inputs.length === 0) { return null; } + return ( -
+
{ inputs.map(i => (
diff --git a/core/src/components/select/select.tsx b/core/src/components/select/select.tsx index 1eb6dd4652..6c3130df03 100644 --- a/core/src/components/select/select.tsx +++ b/core/src/components/select/select.tsx @@ -458,11 +458,12 @@ export class Select implements ComponentInterface { const textPart = addPlaceholderClass ? 'placeholder' : 'text'; // If there is a label then we need to concatenate it with the - // current value and a comma so it separates nicely when the screen reader - // announces it, otherwise just announce the value + // current value (or placeholder) and a comma so it separates + // nicely when the screen reader announces it, otherwise just + // announce the value / placeholder const displayLabel = labelText !== undefined - ? `${displayValue}, ${labelText}` - : displayValue; + ? (selectText !== '' ? `${selectText}, ${labelText}` : labelText) + : selectText; return ( -
+