Skip to content

Commit bedb75a

Browse files
Buckwichbarmac
authored andcommitted
fix: add empty alt text for icon image
Related to camunda/camunda-modeler#4720
1 parent 7ed899e commit bedb75a

File tree

4 files changed

+107
-3
lines changed

4 files changed

+107
-3
lines changed

src/render/PanelHeaderProvider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const PanelHeaderProvider = (translate) => {
9696
const templateIcon = getBusinessObject(element).get(iconProperty);
9797

9898
if (templateIcon) {
99-
return () => <img class="bio-properties-panel-header-template-icon" width="32" height="32" src={ templateIcon } />;
99+
return () => <img class="bio-properties-panel-header-template-icon" width="32" height="32" src={ templateIcon } alt="" />;
100100
}
101101

102102
return iconsByType[ concreteType ];
File renamed without changes.

test/fixtures/a11y-c8.bpmn

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1km2fwi" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.35.0" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.7.0">
3+
<bpmn:process id="Process_1" isExecutable="true">
4+
<bpmn:startEvent id="StartEvent_1">
5+
<bpmn:outgoing>Flow_1</bpmn:outgoing>
6+
</bpmn:startEvent>
7+
<bpmn:serviceTask id="RpaConnector_1" zeebe:modelerTemplate="camunda.connectors.rpa" zeebe:modelerTemplateIcon="data:image/svg+xml;base64,PHN2ZyBpZD0iaWNvbiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgfQogICAgPC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPmJvdDwvdGl0bGU+CiAgPHJlY3QgeD0iMTgiIHk9IjEwIiB3aWR0aD0iMiIgaGVpZ2h0PSIyIi8+CiAgPHJlY3QgeD0iMTIiIHk9IjEwIiB3aWR0aD0iMiIgaGVpZ2h0PSIyIi8+CiAgPHBhdGggZD0iTTI2LDIwSDIxVjE4aDFhMi4wMDIzLDIuMDAyMywwLDAsMCwyLTJWMTJoMlYxMEgyNFY4YTIuMDAyMywyLjAwMjMsMCwwLDAtMi0ySDIwVjJIMThWNkgxNFYySDEyVjZIMTBBMi4wMDIzLDIuMDAyMywwLDAsMCw4LDh2Mkg2djJIOHY0YTIuMDAyMywyLjAwMjMsMCwwLDAsMiwyaDF2Mkg2YTIuMDAyMywyLjAwMjMsMCwwLDAtMiwydjhINlYyMkgyNnY4aDJWMjJBMi4wMDIzLDIuMDAyMywwLDAsMCwyNiwyMFpNMTAsOEgyMnY4SDEwWm0zLDEwaDZ2MkgxM1oiLz4KICA8cmVjdCBpZD0iX1RyYW5zcGFyZW50X1JlY3RhbmdsZV8iIGRhdGEtbmFtZT0iJmx0O1RyYW5zcGFyZW50IFJlY3RhbmdsZSZndDsiIGNsYXNzPSJjbHMtMSIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIi8+Cjwvc3ZnPgo=">
8+
<bpmn:extensionElements>
9+
<zeebe:taskDefinition type="={&#10; label: if (camundaRpaWorkerLabel = null or camundaRpaWorkerLabel = &#34;&#34;) then &#34;default&#34; else camundaRpaWorkerLabel,&#10; baseName: &#34;camunda::RPA-Task::&#34;,&#10; definitionType: baseName + label&#10;}.definitionType" />
10+
<zeebe:ioMapping>
11+
<zeebe:input source="default" target="camundaRpaWorkerLabel" />
12+
</zeebe:ioMapping>
13+
<zeebe:taskHeaders />
14+
<zeebe:properties>
15+
<zeebe:property name="camunda::enablePreRun" value="false" />
16+
<zeebe:property name="camunda::postRun" value="false" />
17+
</zeebe:properties>
18+
<zeebe:linkedResources>
19+
<zeebe:linkedResource resourceId="test" resourceType="RPA" linkName="RPAScript" />
20+
</zeebe:linkedResources>
21+
</bpmn:extensionElements>
22+
<bpmn:incoming>Flow_1</bpmn:incoming>
23+
<bpmn:outgoing>Flow_2</bpmn:outgoing>
24+
</bpmn:serviceTask>
25+
<bpmn:endEvent id="EndEvent_1">
26+
<bpmn:incoming>Flow_2</bpmn:incoming>
27+
</bpmn:endEvent>
28+
<bpmn:sequenceFlow id="Flow_2" sourceRef="RpaConnector_1" targetRef="EndEvent_1" />
29+
<bpmn:sequenceFlow id="Flow_1" sourceRef="StartEvent_1" targetRef="RpaConnector_1" />
30+
</bpmn:process>
31+
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
32+
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
33+
<bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1">
34+
<dc:Bounds x="182" y="102" width="36" height="36" />
35+
</bpmndi:BPMNShape>
36+
<bpmndi:BPMNShape id="ServiceTask_1_di" bpmnElement="RpaConnector_1">
37+
<dc:Bounds x="270" y="80" width="100" height="80" />
38+
</bpmndi:BPMNShape>
39+
<bpmndi:BPMNShape id="EndEvent_1_di" bpmnElement="EndEvent_1">
40+
<dc:Bounds x="422" y="102" width="36" height="36" />
41+
</bpmndi:BPMNShape>
42+
<bpmndi:BPMNEdge id="Flow_2_di" bpmnElement="Flow_2">
43+
<di:waypoint x="370" y="120" />
44+
<di:waypoint x="422" y="120" />
45+
</bpmndi:BPMNEdge>
46+
<bpmndi:BPMNEdge id="Flow_1_di" bpmnElement="Flow_1">
47+
<di:waypoint x="218" y="120" />
48+
<di:waypoint x="270" y="120" />
49+
</bpmndi:BPMNEdge>
50+
</bpmndi:BPMNPlane>
51+
</bpmndi:BPMNDiagram>
52+
</bpmn:definitions>

test/spec/BpmnPropertiesPanelRenderer.spec.js

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,14 +1061,14 @@ describe('<BpmnPropertiesPanelRenderer>', function() {
10611061

10621062
describe('a11y', function() {
10631063

1064-
it('should have no violations', async function() {
1064+
it('camunda 7 bpmn should have no violations', async function() {
10651065

10661066
// given
10671067

10681068
// (0) this test needs some time
10691069
this.timeout(5000);
10701070

1071-
const diagramXml = require('test/fixtures/a11y.bpmn').default;
1071+
const diagramXml = require('test/fixtures/a11y-c7.bpmn').default;
10721072

10731073
// (1) ensure fully opened properties panel
10741074
let modeler;
@@ -1129,6 +1129,58 @@ describe('<BpmnPropertiesPanelRenderer>', function() {
11291129
await expectNoViolations(propertiesContainer);
11301130
});
11311131

1132+
1133+
it('camunda 8 bpmn with element template should have no violations', async function() {
1134+
1135+
// given
1136+
1137+
// (0) this test needs some time
1138+
this.timeout(5000);
1139+
1140+
const diagramXml = require('test/fixtures/a11y-c8.bpmn').default;
1141+
1142+
// (1) ensure fully opened properties panel
1143+
let modeler;
1144+
await act(async () => {
1145+
const result = await createModeler(
1146+
diagramXml,
1147+
{
1148+
additionalModules: [
1149+
CamundaBehaviorsModule,
1150+
BpmnPropertiesPanel,
1151+
BpmnPropertiesProvider,
1152+
CamundaPropertiesProvider
1153+
],
1154+
moddleExtensions: {
1155+
camunda: CamundaModdle
1156+
},
1157+
layout: {
1158+
groups: {
1159+
'general': { open: true },
1160+
'documentation': { open: true },
1161+
'ElementTemplates__CustomProperties-script': { open: true },
1162+
'ElementTemplates__CustomProperties-worker': { open: true },
1163+
'ElementTemplates__CustomProperties-prerun': { open: true },
1164+
'ElementTemplates__CustomProperties-postrun': { open: true },
1165+
'ElementTemplates__CustomProperties-input': { open: true },
1166+
'Zeebe__ExecutionListeners': { open: true },
1167+
}
1168+
}
1169+
}
1170+
);
1171+
modeler = result.modeler;
1172+
});
1173+
1174+
const selection = modeler.get('selection');
1175+
const elementRegistry = modeler.get('elementRegistry');
1176+
1177+
await act(() => selection.select(elementRegistry.get('RpaConnector_1')));
1178+
1179+
1180+
// when
1181+
await expectNoViolations(propertiesContainer);
1182+
});
1183+
11321184
});
11331185

11341186
});

0 commit comments

Comments
 (0)