()
| 727 | } |
| 728 | |
| 729 | private renderLabel() { |
| 730 | const { label, labelTextId } = this; |
| 731 | |
| 732 | return ( |
| 733 | <div |
| 734 | class={{ |
| 735 | 'label-text-wrapper': true, |
| 736 | 'label-text-wrapper-hidden': !this.hasLabel, |
| 737 | }} |
| 738 | // Prevents Android TalkBack from focusing the label separately. |
| 739 | // The input remains labelled via aria-labelledby. |
| 740 | aria-hidden={this.hasLabel ? 'true' : null} |
| 741 | > |
| 742 | {label === undefined ? ( |
| 743 | <slot name="label"></slot> |
| 744 | ) : ( |
| 745 | <div class="label-text" id={labelTextId}> |
| 746 | {label} |
| 747 | </div> |
| 748 | )} |
| 749 | </div> |
| 750 | ); |
| 751 | } |
| 752 | |
| 753 | /** |
| 754 | * Gets any content passed into the `label` slot, |
no outgoing calls
no test coverage detected