Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table header "scope" attribute is incorrect for 'header: both' option #2996

Closed
Dumluregn opened this issue Mar 28, 2019 · 4 comments
Closed
Assignees
Labels
accessibility Issue related to accessibility. plugin:table The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.

Comments

@Dumluregn
Copy link
Contributor

Dumluregn commented Mar 28, 2019

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Go to https://ckeditor.com/docs/ckeditor4/latest/examples/standardpreset.html.
  2. Create 2x2 table with both headers option.
  3. Check the source code of table.

Expected result

Table source code should be:

<table border="1" cellpadding="1" cellspacing="1" style="width:500px">
	<thead>
		<tr>
			<th scope="col">&nbsp;</th>
			<th scope="col">&nbsp;</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<th scope="row">&nbsp;</th>
			<td>&nbsp;</td>
		</tr>
	</tbody>
</table>

Actual result

scope attribute is incorrect for [ 1, 1 ] cell:

<table border="1" cellpadding="1" cellspacing="1" style="width:500px">
	<thead>
		<tr>
			<th scope="row">&nbsp;</th>
			<th scope="col">&nbsp;</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<th scope="row">&nbsp;</th>
			<td>&nbsp;</td>
		</tr>
	</tbody>
</table>

Other details

  • Browser: every, e.g. Chrome v73.0.x
  • OS: macOS 10.14.3
  • CKEditor version: 4.11.3
  • Installed CKEditor plugins: table
@Dumluregn Dumluregn added type:bug A bug. status:confirmed An issue confirmed by the development team. plugin:table The plugin which probably causes the issue. labels Mar 28, 2019
@Dumluregn
Copy link
Contributor Author

Related to #2881 and #2882.

@bhdzllr
Copy link

bhdzllr commented May 23, 2019

I created a quick fix for this problem as a plugin by overwriting the "onOk" function for the table dialog. To do this I copied the code from the plugin, the modified parts are marked with "// Modified" in the code: https://gist.github.com/bhdzllr/995d71c2ee725f1cc0565d8f4dabe6c9

I just tested it by myself and did not run any automated tests with this solution.

@Dumluregn
Copy link
Contributor Author

Thank you for taking your time to solve this issue, feel free to create PR to our repo.

@KarolDawidziuk
Copy link
Contributor

Closed in #5357.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Issue related to accessibility. plugin:table The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.
Projects
None yet
Development

No branches or pull requests

5 participants