# Attach (recommended) or Link to PDF file here:
https://download.data.public.lu/resources/audits-complets-de-laccessibilite-numerique/20210924-075909/20210809-rapport-audit-rgaa-men-public-lu-final.pdf

# Configuration:
- Web browser and its version: Firefox 93.0 
- Operating system and its version: Windows 10 Version 1909 Build 18363.1256
- PDF.js version: default from Firefox 93.0
- Is a browser extension: no
- Screen reader: NVDA 2021.2
- OS language: english

# Steps to reproduce the problem:
1. open the screen reader
2. open firefox 
3. open the file in firefox
4. read the file with the screen reader

# What is the expected behavior? (add screenshot)

The TTS in NVDA should be switched to the correct language according to the main language of the PDF file. This is done correctly in Acrobat Reader 2021.007.20095.

Here is a sreenshot of the language metadata for the given example file, where the main language is french.
![screenshot of the language metadata for the given example file](https://user-images.githubusercontent.com/16536731/136522723-9985b0d2-81e2-4abf-8d3b-4ee2006b492a.jpg)


The main language metadata is for example expected to be provided by the Matterhorn Protocol 1.1, checkpoint 11.

This metadata is provided in /Lang in the Root catalog. It could be provided in a "lang" attribute in the html generated by pdf.js.

As a side note, it could also be interesting to show the default language of the document in the document properties of pdf.js. It seems to be currently not the case.

# What went wrong? (add screenshot)

The file is read in english even if the default language of the file is french.
Executing `document.querySelectorAll('[lang]').length` in the console on this file returns 0.


# Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):
/


PDFViewerApplication.appConfig.toolbar.pageNumber.select();
        handled = true;
        break;
    }
  }
  if (handled) {
    if (ensureViewerFocused && !isViewerInPresentationMode) {
      pdfViewer.focus();
    }
    evt.preventDefault();
    return;
  }
  
  
  const curElement = getActiveOrFocusedElement();
  const curElementTagName = curElement?.tagName.toUpperCase();
  if (
    curElementTagName === "INPUT" ||
    curElementTagName === "TEXTAREA" ||
    curElementTagName === "SELECT" ||
    curElement?.isContentEditable
  ) {
    
    if (evt.keyCode !==  27) {
      return;
    }
  }
  
  if (cmd === 0) {