Skip to content

Commit

Permalink
UI Components, fix validate issue, remove dialog from modal role.
Browse files Browse the repository at this point in the history
  • Loading branch information
Amstutz authored and klees committed Jan 30, 2025
1 parent ce03bec commit 9a50e13
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<dialog class="c-modal c-modal--interruptive" tabindex="-1" role="dialog" id="{ID}">
<dialog class="c-modal c-modal--interruptive" tabindex="-1" id="{ID}">
<div class="modal-dialog" role="document">
<form action="{FORM_ACTION}" method="POST">
<div class="modal-content">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<dialog class="c-modal c-modal--lightbox il-modal-lightbox il-modal-lightbox-{COLOR_SCHEME}" tabindex="-1" role="dialog" id="{ID}">
<dialog class="c-modal c-modal--lightbox il-modal-lightbox il-modal-lightbox-{COLOR_SCHEME}" tabindex="-1" id="{ID}">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content il-modal-lightbox-page">
<div class="modal-header">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<dialog class="c-modal il-modal-roundtrip" tabindex="-1" role="dialog" id="{ID}">
<dialog class="c-modal il-modal-roundtrip" tabindex="-1" id="{ID}">
<div class="modal-dialog" role="document" data-replace-marker="component">
<div class="modal-content">
<div class="modal-header">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="il-prompt" id="{ID}">
<dialog role="dialog" aria-labelledby="{ID}_title">
<dialog aria-labelledby="{ID}_title">
<div class="il-prompt__header">
<form>
<button formmethod="dialog" class="close" aria-label="{CLOSE_LABEL}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h3 class="ilHeader" id="{ID}_label">{TITLE}</h3>

<div class="c-table-data__async_modal_container"></div>

<dialog class="c-table-data__async_message c-modal" role="dialog" id="{ID}_msgmodal">
<dialog class="c-table-data__async_message c-modal" id="{ID}_msgmodal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function testRenderStandard(): void

$expected_html = $this->brutallyTrimHTML('
<div id="id_4" class="ui-dropzone ">
<dialog class="c-modal il-modal-roundtrip" tabindex="-1" role="dialog" id="id_1">
<dialog class="c-modal il-modal-roundtrip" tabindex="-1" id="id_1">
<div class="modal-dialog" role="document" data-replace-marker="component">
<div class="modal-content">
<div class="modal-header"><form><button formmethod="dialog" class="close" aria-label="close"><span aria-hidden="true">&times;</span></button></form><h1 class="modal-title">' . $expected_title . ' </h1></div>
Expand Down Expand Up @@ -111,7 +111,7 @@ public function testRenderBulky(): void

$expected_html = $this->brutallyTrimHTML('
<div id="id_4" class="ui-dropzone ui-dropzone-bulky">
<dialog class="c-modal il-modal-roundtrip" tabindex="-1" role="dialog" id="id_1">
<dialog class="c-modal il-modal-roundtrip" tabindex="-1" id="id_1">
<div class="modal-dialog" role="document" data-replace-marker="component">
<div class="modal-content">
<div class="modal-header"><form><button formmethod="dialog" class="close" aria-label="close"><span aria-hidden="true">&times;</span></button></form><h1 class="modal-title">' . $expected_title . ' </h1></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testRenderWrapper(): void
$expected_html = $this->brutallyTrimHTML(
'
<div id="id_4" class="ui-dropzone ui-dropzone-wrapper">
<dialog class="c-modal il-modal-roundtrip" tabindex="-1" role="dialog" id="id_1">
<dialog class="c-modal il-modal-roundtrip" tabindex="-1" id="id_1">
<div class="modal-dialog" role="document" data-replace-marker="component">
<div class="modal-content">
<div class="modal-header"><form><button formmethod="dialog" class="close" aria-label="close"><span aria-hidden="true">&times;</span></button></form><h1 class="modal-title">' . $expected_title . ' </h1></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function testLauncherInlineRendering(): void
</div>
<button class="btn btn-bulky" id="id_5" disabled="disabled"><span class="glyph" role="img"><span class="glyphicon glyphicon-launch" aria-hidden="true"></span></span><span class="bulky-label">different label</span></button>
<div class="c-launcher__form">
<dialog class="c-modal il-modal-roundtrip" tabindex="-1" role="dialog" id="id_1">
<dialog class="c-modal il-modal-roundtrip" tabindex="-1" id="id_1">
<div class="modal-dialog" role="document" data-replace-marker="component">
<div class="modal-content">
<div class="modal-header">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ protected function getKeyValueInterruptiveItem(string $canonical_name): KeyValue
protected function getExpectedHTML(bool $with_items = false): string
{
$expected_start = <<<EOT
<dialog class="c-modal c-modal--interruptive" tabindex="-1" role="dialog" id="id_1">
<dialog class="c-modal c-modal--interruptive" tabindex="-1" id="id_1">
<div class="modal-dialog" role="document">
<form action="myAction.php" method="POST">
<div class="modal-content">
Expand Down
8 changes: 4 additions & 4 deletions components/ILIAS/UI/tests/Component/Modal/LightboxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected function getLightboxPage(): LightboxMockPage
protected static function getExpectedTextPageHTML(): string
{
return <<<EOT
<dialog class="c-modal c-modal--lightbox il-modal-lightbox il-modal-lightbox-bright" tabindex="-1" role="dialog" id="id_1">
<dialog class="c-modal c-modal--lightbox il-modal-lightbox il-modal-lightbox-bright" tabindex="-1" id="id_1">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content il-modal-lightbox-page">
<div class="modal-header">
Expand Down Expand Up @@ -119,7 +119,7 @@ protected static function getExpectedTextPageHTML(): string
protected static function getExpectedImagePageHTML(): string
{
return <<<EOT
<dialog class="c-modal c-modal--lightbox il-modal-lightbox il-modal-lightbox-dark" tabindex="-1" role="dialog" id="id_1">
<dialog class="c-modal c-modal--lightbox il-modal-lightbox il-modal-lightbox-dark" tabindex="-1" id="id_1">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content il-modal-lightbox-page">
<div class="modal-header">
Expand Down Expand Up @@ -153,7 +153,7 @@ protected static function getExpectedImagePageHTML(): string
protected static function getExpectedMixedPagesHTML(): string
{
return <<<EOT
<dialog class="c-modal c-modal--lightbox il-modal-lightbox il-modal-lightbox-dark" tabindex="-1" role="dialog" id="id_1">
<dialog class="c-modal c-modal--lightbox il-modal-lightbox il-modal-lightbox-dark" tabindex="-1" id="id_1">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content il-modal-lightbox-page">
<div class="modal-header">
Expand Down Expand Up @@ -205,7 +205,7 @@ protected static function getExpectedMixedPagesHTML(): string
private static function getExpectedCardPageHTML(): string
{
return <<<EOT
<dialog class="c-modal c-modal--lightbox il-modal-lightbox il-modal-lightbox-bright" tabindex="-1" role="dialog" id="id_1">
<dialog class="c-modal c-modal--lightbox il-modal-lightbox il-modal-lightbox-bright" tabindex="-1" id="id_1">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content il-modal-lightbox-page">
<div class="modal-header">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function testSimpleRendering(): void
protected function getExpectedHTML(): string
{
return <<<EOT
<dialog class="c-modal il-modal-roundtrip" tabindex="-1" role="dialog" id="id_1">
<dialog class="c-modal il-modal-roundtrip" tabindex="-1" id="id_1">
<div class="modal-dialog" role="document" data-replace-marker="component">
<div class="modal-content">
<div class="modal-header">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public function getTotalRowCount(
</div>
<div class="c-table-data__async_modal_container"></div>
<dialog class="c-table-data__async_message c-modal" role="dialog" id="{ID}_msgmodal">
<dialog class="c-table-data__async_message c-modal" id="{ID}_msgmodal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
Expand Down Expand Up @@ -368,7 +368,7 @@ public function getTotalRowCount(
<div class="c-table-data__async_modal_container"></div>
<dialog class="c-table-data__async_message c-modal" role="dialog" id="{ID}_msgmodal">
<dialog class="c-table-data__async_message c-modal" id="{ID}_msgmodal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
Expand Down

0 comments on commit 9a50e13

Please sign in to comment.