modified mapping of header and footer

refer to https://www.w3.org/Bugs/Public/show_bug.cgi?id=21164