kopia lustrzana https://github.com/shoelace-style/shoelace
				
				
				
			remove redundant role
							rodzic
							
								
									b98b10c580
								
							
						
					
					
						commit
						a24eaa6693
					
				| 
						 | 
				
			
			@ -8,6 +8,8 @@ _During the beta period, these restrictions may be relaxed in the event of a mis
 | 
			
		|||
 | 
			
		||||
## Next
 | 
			
		||||
 | 
			
		||||
- Moved `role` from the shadow root to the host element in `<sl-menu>`
 | 
			
		||||
- Removed redundant `role="menu"` in `<sl-dropdown>`
 | 
			
		||||
- Slightly faster animations for showing and hiding `<sl-dropdown>`
 | 
			
		||||
 | 
			
		||||
## 2.0.0-beta.60
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -425,7 +425,6 @@ export default class SlDropdown extends LitElement {
 | 
			
		|||
          <div
 | 
			
		||||
            part="panel"
 | 
			
		||||
            class="dropdown__panel"
 | 
			
		||||
            role="menu"
 | 
			
		||||
            aria-hidden=${this.open ? 'false' : 'true'}
 | 
			
		||||
            aria-labelledby=${this.componentId}
 | 
			
		||||
          >
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,6 +26,10 @@ export default class SlMenu extends LitElement {
 | 
			
		|||
  private typeToSelectString = '';
 | 
			
		||||
  private typeToSelectTimeout: any;
 | 
			
		||||
 | 
			
		||||
  firstUpdated() {
 | 
			
		||||
    this.setAttribute('role', 'menu');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  getAllItems(options: { includeDisabled: boolean } = { includeDisabled: true }) {
 | 
			
		||||
    return [...this.defaultSlot.assignedElements({ flatten: true })].filter((el: HTMLElement) => {
 | 
			
		||||
      if (el.getAttribute('role') !== 'menuitem') {
 | 
			
		||||
| 
						 | 
				
			
			@ -183,7 +187,6 @@ export default class SlMenu extends LitElement {
 | 
			
		|||
      <div
 | 
			
		||||
        part="base"
 | 
			
		||||
        class="menu"
 | 
			
		||||
        role="menu"
 | 
			
		||||
        @click=${this.handleClick}
 | 
			
		||||
        @keydown=${this.handleKeyDown}
 | 
			
		||||
        @keyup=${this.handleKeyUp}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue