@openeuropa/bcl-dropdown 1.10.6 → 1.10.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dropdown.html.twig +12 -7
  2. package/package.json +4 -4
@@ -42,6 +42,7 @@
42
42
  {% set _alignment = alignment|default('') %}
43
43
  {% set _dark = dark ?? false %}
44
44
  {% set _remove_wrapper = remove_wrapper ?? false %}
45
+ {% set _inside_navigation = inside_navigation ?? false %}
45
46
  {% set _items = items|default([]) %}
46
47
 
47
48
  {% set _class = 'dropdown' %}
@@ -75,14 +76,18 @@
75
76
  .setAttribute('id', _id)
76
77
  }) %}
77
78
 
78
- {% if _link %}
79
- {% set _trigger = _trigger|merge({
80
- attributes: _trigger.attributes.setAttribute('role', 'button')
81
- }) %}
79
+ {% if not _inside_navigation %}
80
+ {% if _link %}
81
+ {% set _trigger = _trigger|merge({
82
+ attributes: _trigger.attributes.setAttribute('role', 'button')
83
+ }) %}
84
+ {% else %}
85
+ {% set _trigger = _trigger|merge({
86
+ attributes: _trigger.attributes.setAttribute('autocomplete', 'off')
87
+ }) %}
88
+ {% endif %}
82
89
  {% else %}
83
- {% set _trigger = _trigger|merge({
84
- attributes: _trigger.attributes.setAttribute('autocomplete', 'off')
85
- }) %}
90
+ {% set attributes = attributes.setAttribute('aria-hidden', 'true').setAttribute('role', 'presentation') %}
86
91
  {% endif %}
87
92
 
88
93
  {% if not _remove_wrapper %}
package/package.json CHANGED
@@ -2,14 +2,14 @@
2
2
  "name": "@openeuropa/bcl-dropdown",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "1.10.6",
5
+ "version": "1.10.8",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "description": "OE - BCL dropdown",
10
10
  "dependencies": {
11
- "@openeuropa/bcl-button": "^1.10.6",
12
- "@openeuropa/bcl-link": "^1.10.6"
11
+ "@openeuropa/bcl-button": "^1.10.8",
12
+ "@openeuropa/bcl-link": "^1.10.8"
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
@@ -25,5 +25,5 @@
25
25
  "design-system",
26
26
  "twig"
27
27
  ],
28
- "gitHead": "f2c1911b328b12531079c209ecada73a505713c2"
28
+ "gitHead": "9c2e64443ae179948cbf748c41d438af7a0f2421"
29
29
  }