On Tue, May 13, 2025 at 04:28:28PM +0200, Vincent Lefevre wrote: > "texi2any --html --no-split" generates many accesskey attributes > with the same value. This does not make sense. In particular, the > behavior in such a case depends on the web browser: > > https://www.w3schools.com/TAGs/att_accesskey.asp > > I don't know whether this is possible (this may require Javascript), > but access keys should be related to the current position. >
Thanks for the report. I suppose we should avoid outputting the accesskey attribute for non-split output. The output of the accesskey attribute can be turned off with "texi2any -c USE_ACCESSKEY=0". The following seems to work for the non-XS code: diff --git a/tta/perl/Texinfo/Convert/HTML.pm b/tta/perl/Texinfo/Convert/HTML.pm index c68559c7eb..3435405254 100644 --- a/tta/perl/Texinfo/Convert/HTML.pm +++ b/tta/perl/Texinfo/Convert/HTML.pm @@ -9247,6 +9247,13 @@ sub converter_initialize($) $self->force_conf('SPLIT', 'node'); } + if (!$split) { + my $use_accesskey = $self->get_conf('USE_ACCESSKEY'); + if ($use_accesskey) { + $self->force_conf('USE_ACCESSKEY', 0); + } + } + my $max_header_level = $self->get_conf('MAX_HEADER_LEVEL'); if (!defined($max_header_level)) { $self->force_conf('MAX_HEADER_LEVEL', $defaults{'MAX_HEADER_LEVEL'}); (Similar code would also be needed for the XS code.) Of course, this makes it impossible to turn USE_ACCESSKEY on deliberately, which may or may not be a good thing. Patrice, do you have any thoughts on this?