Skip to content
Snippets Groups Projects
Commit 4742b840 authored by Oliver Schmidt's avatar Oliver Schmidt
Browse files

OZG-7161-7545 fix dropdown layout, opt screenreader, open link in new tab

parent e8b7cb9e
No related branches found
No related tags found
1 merge request!45OZG-7161-7545 UI Optimierung
...@@ -7,10 +7,11 @@ import { OpenLinkIconComponent } from '../../icons/open-link-icon/open-link-icon ...@@ -7,10 +7,11 @@ import { OpenLinkIconComponent } from '../../icons/open-link-icon/open-link-icon
standalone: true, standalone: true,
imports: [LinkComponent, OpenLinkIconComponent], imports: [LinkComponent, OpenLinkIconComponent],
styles: [':host {@apply first:mt-2}'], styles: [':host {@apply first:mt-2}'],
template: ` <ods-link [url]="url" class="bg-whitetext"> template: ` <ods-link [url]="url" class="bg-whitetext" [openInNewTab]="true">
<div class="flex items-center gap-2 px-4 py-3"> <div class="flex items-center gap-2 px-4 py-3">
<p class="text-primary">{{ text }}</p> <p class="font-medium text-primary">{{ text }}</p>
<ods-open-link-icon size="small" /> <ods-open-link-icon class="size-5" />
<span class="sr-only">Öffnet in einem neuen Tab</span>
</div> </div>
</ods-link>`, </ods-link>`,
}) })
......
...@@ -5,7 +5,7 @@ import { Component, Input } from '@angular/core'; ...@@ -5,7 +5,7 @@ import { Component, Input } from '@angular/core';
selector: 'ods-dropdown-menu-text-item', selector: 'ods-dropdown-menu-text-item',
standalone: true, standalone: true,
imports: [CommonModule], imports: [CommonModule],
styles: [':host {@apply flex min-h-12 items-start gap-4 px-4 py-3 text-start first:mt-2}'], styles: [':host {@apply flex min-h-12 items-start gap-4 px-4 py-3 text-start}'],
template: ` template: `
<ng-content select="[icon]" /> <ng-content select="[icon]" />
<div class="w-80 whitespace-normal"> <div class="w-80 whitespace-normal">
......
...@@ -48,7 +48,7 @@ import { twMerge } from 'tailwind-merge'; ...@@ -48,7 +48,7 @@ import { twMerge } from 'tailwind-merge';
</button> </button>
<div <div
*ngIf="isPopupOpen" *ngIf="isPopupOpen"
class="absolute z-50 max-h-120 min-w-44 max-w-96 animate-fadeIn overflow-y-auto rounded bg-dropdownBg shadow-md focus:outline-none" class="absolute z-50 max-h-120 min-w-44 max-w-96 animate-fadeIn overflow-y-auto rounded bg-dropdownBg shadow-md ring-1 ring-grayborder focus:outline-none"
[ngClass]="alignTo === 'left' ? 'right-0' : 'left-0'" [ngClass]="alignTo === 'left' ? 'right-0' : 'left-0'"
role="menu" role="menu"
aria-modal="true" aria-modal="true"
......
...@@ -34,6 +34,7 @@ import { iconVariants, IconVariants } from '../iconVariants'; ...@@ -34,6 +34,7 @@ import { iconVariants, IconVariants } from '../iconVariants';
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24" viewBox="0 0 24 24"
[ngClass]="twMerge(iconVariants({ size }), 'fill-primary', class)" [ngClass]="twMerge(iconVariants({ size }), 'fill-primary', class)"
aria-hidden="true"
> >
<path <path
d="M5 21c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 0 1 3 19V5c0-.55.196-1.02.587-1.413A1.926 1.926 0 0 1 5 3h7v2H5v14h14v-7h2v7c0 .55-.196 1.02-.587 1.413A1.926 1.926 0 0 1 19 21H5Zm4.7-5.3-1.4-1.4L17.6 5H14V3h7v7h-2V6.4l-9.3 9.3Z" d="M5 21c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 0 1 3 19V5c0-.55.196-1.02.587-1.413A1.926 1.926 0 0 1 5 3h7v2H5v14h14v-7h2v7c0 .55-.196 1.02-.587 1.413A1.926 1.926 0 0 1 19 21H5Zm4.7-5.3-1.4-1.4L17.6 5H14V3h7v7h-2V6.4l-9.3 9.3Z"
......
...@@ -29,11 +29,11 @@ ...@@ -29,11 +29,11 @@
[href]="url" [href]="url"
[target]="targetName" [target]="targetName"
[attr.aria-label]="text" [attr.aria-label]="text"
[tooltip]="tooltip"
[color]="'primary'" [color]="'primary'"
[title]="tooltip" [title]="tooltip"
class="button" class="button"
> >
<mat-icon>open_in_new</mat-icon>
<span class="text-sm">{{ text }}</span> <span class="text-sm">{{ text }}</span>
<mat-icon>open_in_new</mat-icon>
<span class="sr-only">{{ tooltip }}</span>
</a> </a>
...@@ -24,12 +24,10 @@ ...@@ -24,12 +24,10 @@
--> -->
<ods-dropdown-menu-text-item <ods-dropdown-menu-text-item
class="border-b border-b-grayborder border-t-grayborder bg-whitetext first:border-t" class="border-b border-b-grayborder border-t-grayborder bg-whitetext"
title="Benutzerleitfaden" title="Benutzerleitfaden"
description="Alle Funktionen der Allgemeinen Fachanwendung (Alfa) erklärt." description="Alle Funktionen der Allgemeinen Fachanwendung (Alfa) erklärt."
> >
<ods-file-icon icon fileType="pdf" size="large"></ods-file-icon> <ods-file-icon icon fileType="pdf" size="large"></ods-file-icon>
<alfa-open-documentation-button additionalContent [url]="url" data-test-id="documentations-component" /> <alfa-open-documentation-button additionalContent [url]="url" data-test-id="documentations-component" />
</ods-dropdown-menu-text-item> </ods-dropdown-menu-text-item>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment