Skip to content

Commit

Permalink
Bump up CakePHP to 5.1.4.
Browse files Browse the repository at this point in the history
Remove undeeded code as the issue with ARIA attributes for `select` has been fixed
in the core.
  • Loading branch information
ADmad committed Dec 13, 2024
1 parent fd31e2a commit fcd0e62
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"require": {
"cakephp/cakephp": "^5.1"
"cakephp/cakephp": "^5.1.4"
},
"require-dev": {
"phpunit/phpunit": "^10.5.5 || ^11.1.3",
Expand Down
13 changes: 0 additions & 13 deletions src/View/Helper/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -898,19 +898,6 @@ protected function _ariaOptions(string $fieldName, array $options): array
$options['error'] !== false &&
$this->isFieldError($fieldName);

// This is required because of a bug in CakePHP 5 due to which
// `aria-invalid` is not applied for `select` tags.
if (
$isError &&
!isset($options['aria-invalid'])
) {
$options['aria-invalid'] = 'true';
}

if (isset($options['aria-describedby'])) {
return $options;
}

$describedByIds = [];

if ($isError) {
Expand Down

0 comments on commit fcd0e62

Please sign in to comment.